Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to apt #1

Closed
earthboundkid opened this issue Apr 17, 2016 · 94 comments
Closed

Add to apt #1

earthboundkid opened this issue Apr 17, 2016 · 94 comments

Comments

@earthboundkid
Copy link

It would be more convenient to install micro on servers if you could just run apt-get install micro.

@aerth
Copy link
Contributor

aerth commented Apr 18, 2016

@carlmjohnson http://pkg-go.alioth.debian.org/packaging.html assuming you are talking about packaging go binary for Debian repository. I think it may be tough to get new software into jessie repo. In the meantime, a .deb package would be nice.

BTW installing the linux binary is as easy as something like:

wget http://zbyedidia.webfactional.com/micro/binaries/micro-linux64.tar.gz
tar xzf micro*
cd micro
./install.sh
sudo cp bin/micro /usr/local/bin/

zyedidia pushed a commit that referenced this issue Aug 31, 2016
Sync repos for updating ASM syntax
@niieani
Copy link

niieani commented Sep 1, 2016

A nice touch would be the addition of micro to brew on macOS (and other package managers on other OSes), so it could be installed with brew install micro.

Packaging for multiple OSes can be painlessly achieved using fpm.

@CamilleScholtz
Copy link
Contributor

@niieani
Copy link

niieani commented Sep 1, 2016

@onodera-punpun Ah, I see, good to know. It would be good if it were to end up in the official homebrew repo though.

@Rowno
Copy link

Rowno commented Sep 7, 2016

Those homebrew instructions should really be in the README. 😉

@zyedidia
Copy link
Owner

zyedidia commented Sep 7, 2016

Yes I've added the instructions to the readme now. I didn't have them before because the brew formula didn't work so well with the nightly binaries, but it's fine now that there are released versions.

@zyedidia
Copy link
Owner

zyedidia commented Sep 9, 2016

Micro is now in the official brew repository :D.

@techtonik
Copy link
Contributor

So what about apt then? Where do we start?

@techtonik
Copy link
Contributor

Okay. They recommend doing it through Debian - http://askubuntu.com/questions/16446/how-to-get-my-software-into-ubuntu

and for Go Debian has these guidelines - https://pkg-go.alioth.debian.org/packaging.html

which basically recommend using this tool - https://github.com/Debian/dh-make-golang

which fails with this:

$ dh-make-golang github.com/zyedidia/micro
2016/12/26 14:18:55 Downloading "github.com/zyedidia/micro/..."
2016/12/26 14:19:53 Determining upstream version number
2016/12/26 14:19:53 WARNING: Annotated tag not found, using lightweight tag "nightly"
2016/12/26 14:19:53     Lightweight tags (created by e.g. "git tag nightly"
2016/12/26 14:19:53     with no flag) are problematic because, among other
2016/12/26 14:19:53     things, they are ignored by "git describe" by default.
2016/12/26 14:19:53     Please suggest that the upstream replaces the
2016/12/26 14:19:53     lightweight tags with annotated ones.  See
2016/12/26 14:19:53     https://github.com/russross/blackfriday/issues/196
2016/12/26 14:19:53     for details.
2016/12/26 14:19:53 
2016/12/26 14:19:53 Package version is "nightly+git20161225.0.d49e366"
2016/12/26 14:19:53 Determining package type
2016/12/26 14:19:53 Assuming you are packaging a program (because "github.com/zyedidia/micro/cmd/micro" defines a main package), use -type to override
2016/12/26 14:19:53 Determining dependencies
2016/12/26 14:19:54 Cannot derive Debian package name: unknown hoster "layeh.com". See -help output for -allow_unknown_hoster

@zyedidia
Copy link
Owner

zyedidia commented Dec 26, 2016

Ok I got it to build using dh-make-golang -allow_unknown_hoster github.com/zyedidia/micro (also make sure you have gbp installed).

That gives this output

2016/12/26 10:39:57 Downloading "github.com/zyedidia/micro/..."
2016/12/26 10:40:21 Determining upstream version number
2016/12/26 10:40:21 WARNING: Annotated tag not found, using lightweight tag "nightly"
2016/12/26 10:40:21     Lightweight tags (created by e.g. "git tag nightly"
2016/12/26 10:40:21     with no flag) are problematic because, among other
2016/12/26 10:40:21     things, they are ignored by "git describe" by default.
2016/12/26 10:40:21     Please suggest that the upstream replaces the
2016/12/26 10:40:21     lightweight tags with annotated ones.  See
2016/12/26 10:40:21     https://github.com/russross/blackfriday/issues/196
2016/12/26 10:40:21     for details.
2016/12/26 10:40:21 
2016/12/26 10:40:21 Package version is "nightly+git20161226.2.143339d"
2016/12/26 10:40:21 Determining package type
2016/12/26 10:40:21 Assuming you are packaging a program (because "github.com/zyedidia/micro/cmd/micro" defines a main package), use -type to override
2016/12/26 10:40:21 Determining dependencies
2016/12/26 10:40:22 WARNING: Using "layeh" as canonical hostname for "layeh.com". If that is not okay, please file a bug against dh-make-golang.
2016/12/26 10:40:23 Build-Dependency "golang-github-zyedidia-tcell-dev" is not yet available in Debian
2016/12/26 10:40:23 Build-Dependency "golang-layeh-gopher-luar-dev" is not yet available in Debian
2016/12/26 10:40:23 Build-Dependency "golang-github-sergi-go-diff-dev" is not yet available in Debian
2016/12/26 10:40:23 Build-Dependency "golang-github-yuin-gopher-lua-dev" is not yet available in Debian
2016/12/26 10:40:23 Build-Dependency "golang-github-zyedidia-glob-dev" is not yet available in Debian
2016/12/26 10:40:23 Build-Dependency "golang-github-zyedidia-json5-dev" is not yet available in Debian
2016/12/26 10:40:23 Build-Dependency "golang-github-go-errors-errors-dev" is not yet available in Debian
2016/12/26 10:40:23 Build-Dependency "golang-github-zyedidia-clipboard-dev" is not yet available in Debian
2016/12/26 10:40:25 
2016/12/26 10:40:25 Packaging successfully created in /home/zachary/micro
2016/12/26 10:40:25 
2016/12/26 10:40:25 Resolve all TODOs in itp-micro.txt, then email it out:
2016/12/26 10:40:25     sendmail -t < itp-micro.txt
2016/12/26 10:40:25 
2016/12/26 10:40:25 Resolve all the TODOs in debian/, find them using:
2016/12/26 10:40:25     grep -r TODO debian
2016/12/26 10:40:25 
2016/12/26 10:40:25 To build the package, commit the packaging and use gbp buildpackage:
2016/12/26 10:40:25     git add debian && git commit -a -m 'Initial packaging'
2016/12/26 10:40:25     gbp buildpackage --git-pbuilder
2016/12/26 10:40:25 
2016/12/26 10:40:25 To create the packaging git repository on alioth, use:
2016/12/26 10:40:25     ssh git.debian.org "/git/pkg-go/setup-repository micro 'Packaging for micro'"
2016/12/26 10:40:25 
2016/12/26 10:40:25 Once you are happy with your packaging, push it to alioth using:
2016/12/26 10:40:25     git push git+ssh://git.debian.org/git/pkg-go/packages/micro.git --tags master pristine-tar upstream

So it seems like it shouldn't be too hard to fix the TODOs. The version seems to be a problem, but we can always just checkout the commit with v1.1.3 in micro before building for apt.

@techtonik
Copy link
Contributor

I thought that for fixing version it is enough to create annotated tag as mentioned in the first warning. No?

@GeigerCounter
Copy link
Contributor

@carlmjohnson We're tentatively working on this... At very least producing a deb and a ppa. No ETA on when that might happen, I'm afraid. See this pull:
#563

We're still testing and expanding that. In the meantime, we've got to get in touch with repo maintainers.

@rikvdh
Copy link

rikvdh commented Mar 29, 2017

Perhaps take a look at https://github.com/xor-gate/debpkg for debian-packaging support.

@xor-gate
Copy link

Also nice to look at is fpm: https://github.com/jordansissel/fpm

@Justinzobel
Copy link

Heh micro went into Solus October 2016 https://dev.solus-project.com/R2071:5b6d37f85384521ddac017a9d8faa87524ad8286

@danmaz74
Copy link

Please work on this - I suspect that adoption could multiply by 10 with it.

@ziggy42
Copy link

ziggy42 commented Oct 2, 2017

The day I will be able to just apt install micro I'll do it on all my servers.

@techtonik
Copy link
Contributor

The only way for this to be fixed is for somebody who uses Debian derived OS daily to step up to be Debian maintainer, which is basically following https://github.com/Debian/dh-make-golang and keeping communication between Debian and micro.

@rajudev
Copy link

rajudev commented Jan 29, 2018

Is anyone still actively working on the debian packaging for micro, I recently stumbled across micro and I thought it would be great to have it in debian and its derivatives.

I am already a Debian contributor and have done some Debian packaging

Also note that, I am not talking just about making a deb, I would try to get this into Debian so that you would just be able to apt install micro

If someone is working on it, please let me know. I can collaborate, otherwise I'll have to start from scratch.

@zyedidia
Copy link
Owner

I don't believe anyone is currently working on this. I would really appreciate if you could get micro into apt though. Thanks so much!

I have no experience in debian packaging but you may find the build-deb.sh script in the tools/ directory useful.

@rajudev
Copy link

rajudev commented Jan 29, 2018

Thanks, I'll see what I can get done at the earliest.

@rajudev
Copy link

rajudev commented Jan 30, 2018

And I have started the process.
Intent to Package bug report in Debian
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888813

@zyedidia
Copy link
Owner

zyedidia commented Feb 2, 2018

Thanks so much! Any idea how long the process will take?

@rajudev
Copy link

rajudev commented Feb 3, 2018

The process is a bit strict.
Any software that we need to package, must have all its dependencies packaged.
So I need to package the dependencies first.

Your package is mostly written in Go.

But luckily it has only one unpackaged dependency which is not in Debian already.
goconvey is the one I need to package first.

You can see some of the documentation that I am maintaining on Debian's git repository
A few of us are on to this working as a team. @Manas-kashyap is on to packaging goconvey for now. And hopefully he'll get it done in next 2-3 Days or less. Once that is done, if there are no Lua dependencies, then I should take less than a week to get the package in Debian's new queue There it would be manually approved by a Debian FTP master team. Once they approve it, the package would be in Debian Sid/unstable and should be available in Debian's repos in a few hours.

If you are looking for a timeframe, then I would give you an over estimated time frame of 10-15 days, to get the package to the new queue.

I am having a conversation regarding the same on Debian's mailing list. Go and Lua as well.

Also during the process I would ask here questions if any regarding the dependencies or any other stuff.

One more thing, In the previous comments, you mentioned about build-deb.sh script in the tools/ directory. Although I am not packaging that way, but just letting you know that it's not working for me, or I am doing something wrong with that. Here's the output.

rajudev@sanganak ~/d/s/t/m/micro> ls
assets/  data/    LICENSE-THIRD-PARTY  README.md  snapcraft.yaml
cmd/     LICENSE  Makefile             runtime/   tools/
rajudev@sanganak ~/d/s/t/m/micro> cd tools/
rajudev@sanganak ~/d/s/t/m/m/tools> ls
build-date.go       build-rpm.sh*      cross-compile.sh*  nightly-release.sh*  semver/
build-deb.sh*       build-version.go   info-plist.go      pre-release.sh*      vendor-src.sh*
build-packages.sh*  compile-linux.sh*  micro.spec         release.sh*
rajudev@sanganak ~/d/s/t/m/m/tools> ./build-deb.sh 
Failed to execute process './build-deb.sh'. Reason:
exec: Exec format error
The file './build-deb.sh' is marked as an executable but could not be run by the operating system.
rajudev@sanganak ~/d/s/t/m/m/tools> ./build-packages.sh 
Failed to execute process './build-packages.sh'. Reason:
exec: Exec format error
The file './build-packages.sh' is marked as an executable but could not be run by the operating system.
rajudev@sanganak ~/d/s/t/m/m/tools> sudo ./build-deb.sh 
[sudo] password for rajudev: 
./build-deb.sh: 4: ./build-deb.sh: Syntax error: "(" unexpected
rajudev@sanganak ~/d/s/t/m/m/tools> micro build-deb.sh 
rajudev@sanganak ~/d/s/t/m/m/tools> 


I will keep you informed. Thanks to all the contributors of micro. My favourite text editor these days(along with nano :) ).

@aerth
Copy link
Contributor

aerth commented Jan 15, 2020

it works on buster

wget http://ftp.us.debian.org/debian/pool/main/m/micro/micro_1.4.1-2_amd64.deb
dpkg -i micro*.deb
/usr/bin/micro: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=69f9578d4eddc8ee9a4ac45f1c12dc18ee02da21, for GNU/Linux 3.2.0, stripped

for your raspbian, go ahead and try https://packages.debian.org/bullseye/micro

@pravi
Copy link

pravi commented Jan 18, 2020

It is uploaded to buster-backports https://ftp-master.debian.org/new/micro_1.4.1-2~bpo10+1.html

If all goes well, it should get accepted in a week's (usually queue gets cleared every week) time.

Thanks to @utkarsh2102 for uploading all build dependencies to buster-backports (all of them got accepted today).

@pravi
Copy link

pravi commented Jan 20, 2020

Just noticed #1093 is affecting us, probably updating to newer versions will fix it looking at the comments.

@pravi
Copy link

pravi commented Jan 21, 2020

So its now available in buster-backports as well. https://packages.debian.org/buster-backports/micro

On a buster system with buster-backports repo enabled,

apt -t buster-backports install micro will get it installed.

# apt -t buster-backports install micro
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libice6 libsm6 libxmu6 libxt6 x11-common xclip
The following NEW packages will be installed:
  libice6 libsm6 libxmu6 libxt6 micro x11-common xclip
0 upgraded, 7 newly installed, 0 to remove and 39 not upgraded.
Need to get 4,301 kB of archives.
After this operation, 15.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

@nicocti
Copy link

nicocti commented Jan 26, 2020

incoming with ubuntu 20.04 ;) https://packages.ubuntu.com/focal/micro

zyedidia pushed a commit that referenced this issue Feb 8, 2020
Say "syntax highlighting" instead of just "syntax"
@utkarsh2102
Copy link
Contributor

Hi @zyedidia,
This issue can now be closed! \o/

@zyedidia
Copy link
Owner

Awesome! How does updating the apt version of micro when there are new releases work?

@theAkito
Copy link
Contributor

Awesome! How does updating the apt version of micro when there are new releases work?

Maybe these can help...
https://www.debian.org/doc/manuals/distribute-deb/distribute-deb.html
https://askubuntu.com/a/16456/610588
😃

@utkarsh2102
Copy link
Contributor

utkarsh2102 commented Feb 10, 2020

Awesome! How does updating the apt version of micro when there are new releases work?

@zyedidia, it's the maintainer's work. Either the person who maintains the package does the update. Or anyone from the Golang team can do that. (in general, anyone can do it as far as nothing breaks and the update doesn't violate any Debian policy or so).
The general workflow is:

  • Pull the update from GitHub once the release is made.
  • Integrate the changes and try to build.
  • Fix if it doesn't build; check if the dependencies are to be updated too or not.
  • When it builds fine, we check for policy violation via a tool called "lintian".
  • If everything's fine, we do a quick smoke test and then upload to the archive.

That said, I am one of the maintainers of the package (and the other one is @rajudev) and I'd take care of the update as soon as 2.0.0 release is done :)

@rajudev
Copy link

rajudev commented Feb 11, 2020

@zyedidia Another thing that you can do is to ping me and @utkarsh2102 on this issue after each release, and whoever of us can will update the package on Debian Side. You can close this issue now.

@utkarsh2102
Copy link
Contributor

Hear, hear!
I just uploaded micro 2.0.0 to the Debian archive! It can be installed within a few hours now ❤️

@rajudev
Copy link

rajudev commented Feb 12, 2020

Created a PR #1506
Updated installation instructions for non-stable releases for Debian and Ubuntu.
Also added a badge to show package version in Debian

@zyedidia
Copy link
Owner

Is it possible to update the version of micro currently in the ubuntu 20.04 repos? I think the current version has problems with log.txt and version information. If building 2.0.4, also note that the build tags need to be updated to include a v2 in the path.

In general, is there any reason why the makefile can't be used to package the debian version? This way I can make sure that the build tags and commands are correct if that ever gets updated again in the future.

@utkarsh2102
Copy link
Contributor

Is it possible to update the version of micro currently in the ubuntu 20.04 repos? I think the current version has problems with log.txt and version information.

Ah! I am a Debian Developer and manage the Debian releases (which gets in sync with the Ubuntu repositories) but I think I can try to get these two things fixed. I'll see what and how can I do that because 20.04 (focal) has already been released and it's a stable release so I think the only way out is the backports. I'll get in contact with some Ubuntu devs to figure a way out.

If building 2.0.4, also note that the build tags need to be updated to include a v2 in the path.

Right, thanks for the heads up! I read the release notes and I'll take care of this!
(and hopefully, I'll not miss anything!)

In general, is there any reason why the makefile can't be used to package the debian version?

The workflow and the build is different from how it works with Makefile. debian/rules (file which is basically a build script) is a Makefile but different than what the usual ones look like.
Here's the debian/rules file that is used for the Debian package.
(NOTE: this is for 2.0.3 so doesn't have the v2 path yet. But I plan on updating to v2.0.4 soon!)

@utkarsh2102
Copy link
Contributor

Is it possible to update the version of micro currently in the ubuntu 20.04 repos? I think the current version has problems with log.txt and version information.

Ah! I am a Debian Developer and manage the Debian releases (which gets in sync with the Ubuntu repositories) but I think I can try to get these two things fixed. I'll see what and how can I do that because 20.04 (focal) has already been released and it's a stable release so I think the only way out is the backports. I'll get in contact with some Ubuntu devs to figure a way out.

Ah, 2.0.4 depends on the newer version of tcell, too.
Hm, I'll probably have them backported now. I don't see any other way or have them in the next point release of focal.

If building 2.0.4, also note that the build tags need to be updated to include a v2 in the path.

Right, thanks for the heads up! I read the release notes and I'll take care of this!
(and hopefully, I'll not miss anything!)

Both tcell and micro v2.0.4 has been uploaded to Debian! 🚀

@trolzen
Copy link
Contributor

trolzen commented Aug 20, 2022

@utkarsh2102 @rajudev Hi! Could you update micro to the latest version 2.0.11 for Debian Busty and Bullseye?

@utkarsh2102
Copy link
Contributor

Yes! I’ll get to it in a bit. @gabrielapivetta, would you be interested in taking this, though?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests