It would be more convenient to install micro on servers if you could just run apt-get install micro.
@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/
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.
@niieani
It's already homebrew: https://github.com/zyedidia/micro/wiki/Installing-Micro
@onodera-punpun Ah, I see, good to know. It would be good if it were to end up in the official homebrew repo though.
Those homebrew instructions should really be in the README. 😉
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.
Micro is now in the official brew repository :D.
So what about apt then? Where do we start?
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
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.
I thought that for fixing version it is enough to create annotated tag as mentioned in the first warning. No?
@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:
https://github.com/zyedidia/micro/pull/563
We're still testing and expanding that. In the meantime, we've got to get in touch with repo maintainers.
Perhaps take a look at https://github.com/xor-gate/debpkg for debian-packaging support.
Also nice to look at is fpm: https://github.com/jordansissel/fpm
Heh micro went into Solus October 2016 https://dev.solus-project.com/R2071:5b6d37f85384521ddac017a9d8faa87524ad8286
Please work on this - I suspect that adoption could multiply by 10 with it.
The day I will be able to just apt install micro I'll do it on all my servers.
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.
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.
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.
Thanks, I'll see what I can get done at the earliest.
And I have started the process.
Intent to Package bug report in Debian
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888813
Thanks so much! Any idea how long the process will take?
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 :) ).
Ok thanks for all the info. I think the reason you are having a dependency issue with goconvey is because it is not included in the vendor directory of dependencies because it is only needed for tcell tests.
All of micro's dependencies (except goconvey) are stored as git submodules in cmd/micro/vendor so they can be pinned to the correct versions (Go's dependency management has issues). This is probably why you aren't seeing any other problematic dependencies (I really doubt my modified fork of tcell is packaged in Debian). I could add goconvey as a git submodule and then you probably wouldn't need to package it.
I would be happy to do that and release a new version (there have been a few useful changes since 1.4.0) if that would help you out. Thanks again for doing this packaging!
I added goconvey to the vendor folder just because it should be there. I'm not really sure why it wasn't before. This should also mean that you won't have to package goconvey.
@zyedidia Thanks for the commit
It looks like I do not need to package goconvey now.
And it is not being detected as the build dependency by the golang build system. You saved me some time there.
I am on to getting it packaged. Although I have not commited the work on packaging to a git repository.
Once done, I'll post the link here.
While working on the packaging, I have one problem. Albeit not a technical one but a legal one.
As per Debian policy we must clearly state the licenses which are involved in a package, along with the files to which the license applies to.
The source of micro contains two license files, LICENSE and LICENSE-THIRD-PARTY . You have clearly stated the license which applies to your work, as well as the LICENSES of the third parties who's work you might be re-using.
The only issue here is that you have not specified the files on which these third party licenses apply to.
To make the context more clear. Consider the files as * , your license applies to * and is under MIT.
My work would be on packaging and that would be an added folder in your source code which is debian/
So my work would be applying to debian/* and I usually maintain my work under same license as the upstream that is MIT.
Now comes the part of third party licenses. As the author you would have a better idea of which licenses belong to which particular files.
For your reference you can take an example of these
apache2 hereSo I hope I have given you a better idea.
We can still get it done, without giving the exact specifics, but I would try to be as standards compliant as I can.
I think you should do this, not just because for Debian Packaging, but if you intend to get it packaged for more systems using rpm's and others. This would help other packagers who would want to get micro into there package systems.
It is just that Debian strive's to maintain, package compliance. This maintains the quality of packages in Debian and make's sure that a package maintains a standard.
Since micro ships with all the dependencies in the repository (as git submodules) this is a bit messy but I think I've got all the licenses in order here.
okay, let me verify that file and get back to this thread in detail.
Also note, I have made a deb already today although not a policy compliant one. It installs and works fine.
If you want you can start distributing debs through the releases.
Also today with some changes in dh-make-golang source code, which excludes the vendor directory for dependencies. We now have some dependencies of your package which are not in Debian already.
8 immediate dependencies to be precise. and then there would some sub dependencies as well.
I am working on reworking the structure of the package and getting it policy compliant.
Will give an update on the exact dependency structure in a while.
Okay this seems to have gotten quite a bit more complex. The vendor directory is supposed to make things simpler so the dependencies can just be provided with micro. I'm not sure if they then really count as source code and need to be listed as files in the project in the licenses file.
Also I don't really see why all the Go dependencies need to be packaged before/separately from micro. These libraries are being statically linked and are some closely coupled to micro so it doesn't really seem to make sense to need a separate package for each library. Maybe I am misunderstanding what it means to package something.
Let me know if you have any more problems.
Just an update.
Here is a temporary dependency tree for micro.

The one's in red are having some issues while packaging.
https://salsa.debian.org/libregeekingkid-guest/micro/wikis/Dependency-Tree-of-Micro
I'll have some issues with some of these dependencies.
Will ask about individual issues while working on them.
I have hopefully removed the need for atotto/clipboard (zyedidia/clipboard can just use its own code for tests and the command line tool can be removed).
Also I don't really see why all the Go dependencies need to be packaged before/separately from micro. These libraries are being statically linked and are some closely coupled to micro so it doesn't really seem to make sense to need a separate package for each library.
In Debian, one upstream project maps to one Debian package. This is done so that we have precisely one point we need to update when we do security or portability fixes, for example. Hence, we cannot use the vendor/ directory.
@zyedidia could you please look into https://github.com/zyedidia/clipboard/issues/1
We are doing our bits to get this done at the earliest. Please look into the issues of licensing and copyrights at the earliest on that repo.
In some of the repositories which you have forked, you should also update the licensing and stuff related to you. Otherwise the copyright and other details are still there from the original author.
Let me know if you need more details.
For those looking to a fast way to install this on a debian based server, here's a one liner that works on ubuntu:
wget -qO- https://github.com/zyedidia/micro/releases/download/v1.4.0/micro-1.4.0-linux64.tar.gz | tar -zxvC $HOME/.local/bin/ --strip-components=1 micro-1.4.0/micro
Also, maybe it's easier to setup your own PPA rather than wait for Debian Mantainers to approve your dependencies.
A PPA by and large only helps Ubuntu users, a 3rd party repo would be better suited for reaching multiple parties.
Edit: honestly working on getting it in the official Debian repositories would be more beneficial than doing that anyways.
If you're interested in making a repo for just about all Linux distros from one place, the openSUSE Build Service can do that.
I started packaging micro a while ago in Debian. From over 15 dependencies, me and a few friends managed to package around half of the dependencies. For the next month, I'll extensively get on to packaging the remaining few and get this into Debian at the earliest. Hopefully, this will be part of the upcoming Debian buster release
Also I request @zyedidia to attend to any licensing related issues any of the repositories of micro or its dependencies.
I have updated the readme and license for zyedidia/clipboard. Let me know if you need more done.
I have updated the readme and license for zyedidia/clipboard. Let me know if you need more done.
I'm packaging zyedidia/pty which is dependency of micro. Please, update readme and license for the same.
@zyedidia could you take a look at the build failure at the earliest?
What is causing this?
rajudev@sanganak:~/dev/salsa.debian.org/go-team/packages/micro-deb/micro$ dpkg-buildpackage -us -uc
dpkg-buildpackage: info: source package micro
dpkg-buildpackage: info: source version 1.4.1-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Raju Devidas <[email protected]>
dpkg-buildpackage: info: host architecture amd64
dpkg-source --before-build .
fakeroot debian/rules clean
dh clean --buildsystem=golang --with=golang
dh_auto_clean -O--buildsystem=golang
dh_autoreconf_clean -O--buildsystem=golang
dh_clean -O--buildsystem=golang
dpkg-source -b .
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building micro using existing ./micro_1.4.1.orig.tar.xz
dpkg-source: info: building micro in micro_1.4.1-1.debian.tar.xz
dpkg-source: info: building micro in micro_1.4.1-1.dsc
debian/rules build
dh build --buildsystem=golang --with=golang
dh_update_autotools_config -O--buildsystem=golang
dh_autoreconf -O--buildsystem=golang
dh_auto_configure -O--buildsystem=golang
dh_auto_build -O--buildsystem=golang
cd obj-x86_64-linux-gnu && go install -gcflags=all=\"-trimpath=/home/rajudev/dev/salsa.debian.org/go-team/packages/micro-deb/micro/obj-x86_64-linux-gnu/src\" -asmflags=all=\"-trimpath=/home/rajudev/dev/salsa.debian.org/go-team/packages/micro-deb/micro/obj-x86_64-linux-gnu/src\" -v -p 4 github.com/zyedidia/micro/cmd/micro github.com/zyedidia/micro/cmd/micro/highlight github.com/zyedidia/micro/cmd/micro/shellwords github.com/zyedidia/micro/cmd/micro/terminfo github.com/zyedidia/micro/runtime/syntax github.com/zyedidia/micro/tools github.com/zyedidia/micro/tools/semver
errors
internal/race
runtime/internal/atomic
runtime/internal/sys
sync/atomic
internal/cpu
unicode
unicode/utf8
internal/testlog
internal/bytealg
math
math/bits
encoding
unicode/utf16
runtime
golang.org/x/text/encoding/internal/identifier
image/color
container/list
vendor/golang_org/x/net/dns/dnsmessage
internal/nettrace
runtime/cgo
strconv
crypto/internal/subtle
crypto/subtle
vendor/golang_org/x/crypto/cryptobyte/asn1
vendor/golang_org/x/crypto/curve25519
crypto/rc4
sync
io
reflect
math/rand
syscall
internal/singleflight
bytes
hash
hash/crc32
strings
bufio
crypto
crypto/md5
golang.org/x/text/transform
path
html
time
internal/syscall/unix
github.com/mattn/go-isatty
golang.org/x/text/encoding
crypto/cipher
github.com/gdamore/encoding
golang.org/x/text/encoding/internal
crypto/aes
golang.org/x/text/encoding/charmap
golang.org/x/text/encoding/japanese
internal/poll
sort
os
encoding/binary
regexp/syntax
encoding/base64
fmt
path/filepath
os/signal
golang.org/x/text/encoding/korean
io/ioutil
golang.org/x/text/encoding/simplifiedchinese
regexp
compress/flate
encoding/gob
encoding/json
flag
archive/zip
compress/gzip
context
database/sql/driver
math/big
github.com/flynn/json5
github.com/blang/semver
github.com/go-errors/errors
github.com/mattn/go-runewidth
os/exec
net/url
github.com/yuin/gopher-lua/ast
github.com/sergi/go-diff/diffmatchpatch
github.com/mitchellh/go-homedir
github.com/yuin/gopher-lua/pm
github.com/yuin/gopher-lua/parse
github.com/zyedidia/clipboard
github.com/zyedidia/glob
gopkg.in/yaml.v2
github.com/dustin/go-humanize
github.com/zyedidia/micro/cmd/micro/shellwords
github.com/zyedidia/micro/cmd/micro/terminfo
github.com/yuin/gopher-lua
github.com/lucasb-eyer/go-colorful
github.com/zyedidia/tcell
golang.org/x/text/encoding/traditionalchinese
github.com/zyedidia/pty
log
github.com/zyedidia/terminal
github.com/zyedidia/micro/cmd/micro/highlight
crypto/rand
net
crypto/des
crypto/elliptic
crypto/internal/randutil
crypto/sha512
encoding/asn1
crypto/ecdsa
crypto/hmac
layeh.com/gopher-luar
crypto/rsa
github.com/zyedidia/tcell/encoding
crypto/sha1
crypto/sha256
crypto/dsa
encoding/hex
encoding/pem
crypto/x509/pkix
vendor/golang_org/x/crypto/cryptobyte
vendor/golang_org/x/crypto/internal/chacha20
vendor/golang_org/x/crypto/poly1305
vendor/golang_org/x/crypto/chacha20poly1305
vendor/golang_org/x/text/transform
vendor/golang_org/x/text/unicode/bidi
vendor/golang_org/x/text/unicode/norm
vendor/golang_org/x/net/http2/hpack
mime
vendor/golang_org/x/text/secure/bidirule
mime/quotedprintable
net/http/internal
os/user
github.com/zyedidia/micro/runtime/syntax
# github.com/zyedidia/micro/runtime/syntax
src/github.com/zyedidia/micro/runtime/syntax/syntax_converter.go:157:6: main redeclared in this block
previous declaration at src/github.com/zyedidia/micro/runtime/syntax/syntax_checker.go:11:6
github.com/zyedidia/micro/tools/semver
vendor/golang_org/x/net/idna
github.com/zyedidia/micro/tools
# github.com/zyedidia/micro/tools
src/github.com/zyedidia/micro/tools/build-version.go:29:6: main redeclared in this block
previous declaration at src/github.com/zyedidia/micro/tools/build-date.go:8:6
src/github.com/zyedidia/micro/tools/info-plist.go:16:6: main redeclared in this block
previous declaration at src/github.com/zyedidia/micro/tools/build-version.go:29:6
net/textproto
vendor/golang_org/x/net/http/httpproxy
crypto/x509
vendor/golang_org/x/net/http/httpguts
mime/multipart
crypto/tls
net/http/httptrace
net/http
github.com/zyedidia/micro/cmd/micro
# github.com/zyedidia/micro/cmd/micro
src/github.com/zyedidia/micro/cmd/micro/terminal.go:123:23: event.EscSeq undefined (type tcell.Event has no field or method EscSeq)
src/github.com/zyedidia/micro/cmd/micro/terminal.go:126:22: event.EscSeq undefined (type tcell.Event has no field or method EscSeq)
src/github.com/zyedidia/micro/cmd/micro/view.go:560:57: event.EscSeq undefined (type tcell.Event has no field or method EscSeq)
src/github.com/zyedidia/micro/cmd/micro/view.go:579:8: undefined: tcell.EventRaw
src/github.com/zyedidia/micro/cmd/micro/view.go:582:9: e.EscSeq undefined (type tcell.Event has no field or method EscSeq)
dh_auto_build: cd obj-x86_64-linux-gnu && go install -gcflags=all=\"-trimpath=/home/rajudev/dev/salsa.debian.org/go-team/packages/micro-deb/micro/obj-x86_64-linux-gnu/src\" -asmflags=all=\"-trimpath=/home/rajudev/dev/salsa.debian.org/go-team/packages/micro-deb/micro/obj-x86_64-linux-gnu/src\" -v -p 4 github.com/zyedidia/micro/cmd/micro github.com/zyedidia/micro/cmd/micro/highlight github.com/zyedidia/micro/cmd/micro/shellwords github.com/zyedidia/micro/cmd/micro/terminfo github.com/zyedidia/micro/runtime/syntax github.com/zyedidia/micro/tools github.com/zyedidia/micro/tools/semver returned exit code 2
make: *** [debian/rules:7: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
rajudev@sanganak:~/dev/salsa.debian.org/go-team/packages/micro-deb/micro$
@zyedidia the issue seems to be there because of https://github.com/zyedidia/tcell
https://github.com/zyedidia/tcell/pull/11 will fix @rajudev's issue
I merged that commit because it is useful for using compat with zyedidia/tcell, but I don't believe it will fix the issue @rajudev is experiencing. How are you trying to build micro? It seems like the version of tcell that is being downloaded is not up-to-date. Either checkout master or checkout the idle-wakeup-fix-forked branch of zyedidia/tcell. Older versions do not have EscSeq defined in the Event interface and have not defined the EventRaw struct either (which are the errors you are experiencing).
@zyedidia yes, you are correct. @rajudev's tcell version might be outdated.
A packaging to the latest version of Debian package for tcell was blocked by issue https://github.com/zyedidia/tcell/issues/10, and that's why @rajudev has tried with outdated tcell version. Your merge made the tcell's latest packaging job!
Thank you for your merging!
since golang-github-zyedidia-tcell is already in debian we need to get the newer version of it before updating micro. And since today is the last day for the freeze we wont be able to make it to buster.
We will be able to get it into backports maybe. I am submitting the package anyways with the updated tcell built locally
so the error with tcell is gone for now. but the builds are still failing.
@zyedidia @jmkim could you take a look whenever
rajudev@sanganak:~/dev/salsa.debian.org/go-team/packages/micro-deb/micro$ dpkg-buildpackage -us -uc
dpkg-buildpackage: info: source package micro
dpkg-buildpackage: info: source version 1.4.1-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Raju Devidas <[email protected]>
dpkg-buildpackage: info: host architecture amd64
dpkg-source --before-build .
fakeroot debian/rules clean
dh clean --buildsystem=golang --with=golang
dh_auto_clean -O--buildsystem=golang
dh_autoreconf_clean -O--buildsystem=golang
dh_clean -O--buildsystem=golang
dpkg-source -b .
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building micro using existing ./micro_1.4.1.orig.tar.xz
dpkg-source: info: building micro in micro_1.4.1-1.debian.tar.xz
dpkg-source: info: building micro in micro_1.4.1-1.dsc
debian/rules build
dh build --buildsystem=golang --with=golang
dh_update_autotools_config -O--buildsystem=golang
dh_autoreconf -O--buildsystem=golang
dh_auto_configure -O--buildsystem=golang
dh_auto_build -O--buildsystem=golang
cd obj-x86_64-linux-gnu && go install -gcflags=all=\"-trimpath=/home/rajudev/dev/salsa.debian.org/go-team/packages/micro-deb/micro/obj-x86_64-linux-gnu/src\" -asmflags=all=\"-trimpath=/home/rajudev/dev/salsa.debian.org/go-team/packages/micro-deb/micro/obj-x86_64-linux-gnu/src\" -v -p 4 github.com/zyedidia/micro/cmd/micro github.com/zyedidia/micro/cmd/micro/highlight github.com/zyedidia/micro/cmd/micro/shellwords github.com/zyedidia/micro/cmd/micro/terminfo github.com/zyedidia/micro/runtime/syntax github.com/zyedidia/micro/tools github.com/zyedidia/micro/tools/semver
internal/race
errors
internal/cpu
runtime/internal/atomic
runtime/internal/sys
sync/atomic
unicode
internal/bytealg
unicode/utf8
math
internal/testlog
math/bits
encoding
runtime
unicode/utf16
golang.org/x/text/encoding/internal/identifier
image/color
container/list
vendor/golang_org/x/net/dns/dnsmessage
internal/nettrace
runtime/cgo
strconv
crypto/internal/subtle
crypto/subtle
vendor/golang_org/x/crypto/cryptobyte/asn1
vendor/golang_org/x/crypto/curve25519
crypto/rc4
sync
io
math/rand
reflect
syscall
internal/singleflight
bytes
hash
hash/crc32
strings
bufio
path
crypto
crypto/md5
html
time
internal/syscall/unix
github.com/mattn/go-isatty
golang.org/x/text/transform
crypto/cipher
golang.org/x/text/encoding
crypto/aes
github.com/gdamore/encoding
golang.org/x/text/encoding/internal
golang.org/x/text/encoding/charmap
golang.org/x/text/encoding/japanese
internal/poll
sort
os
encoding/binary
regexp/syntax
golang.org/x/text/encoding/korean
encoding/base64
fmt
path/filepath
io/ioutil
os/signal
golang.org/x/text/encoding/simplifiedchinese
regexp
golang.org/x/text/encoding/traditionalchinese
compress/flate
encoding/gob
archive/zip
compress/gzip
encoding/json
flag
context
math/big
database/sql/driver
github.com/flynn/json5
github.com/blang/semver
github.com/go-errors/errors
github.com/mattn/go-runewidth
os/exec
net/url
github.com/yuin/gopher-lua/ast
github.com/mitchellh/go-homedir
github.com/sergi/go-diff/diffmatchpatch
github.com/yuin/gopher-lua/pm
github.com/yuin/gopher-lua/parse
github.com/dustin/go-humanize
github.com/zyedidia/clipboard
github.com/zyedidia/glob
gopkg.in/yaml.v2
github.com/zyedidia/micro/cmd/micro/shellwords
github.com/zyedidia/micro/cmd/micro/terminfo
github.com/lucasb-eyer/go-colorful
github.com/yuin/gopher-lua
github.com/zyedidia/tcell
github.com/zyedidia/pty
log
github.com/zyedidia/terminal
net
github.com/zyedidia/micro/cmd/micro/highlight
crypto/rand
crypto/des
crypto/elliptic
crypto/internal/randutil
crypto/sha512
encoding/asn1
crypto/ecdsa
github.com/zyedidia/tcell/encoding
crypto/hmac
crypto/rsa
crypto/sha1
layeh.com/gopher-luar
crypto/sha256
crypto/dsa
encoding/hex
crypto/x509/pkix
encoding/pem
vendor/golang_org/x/crypto/cryptobyte
vendor/golang_org/x/crypto/internal/chacha20
vendor/golang_org/x/crypto/poly1305
vendor/golang_org/x/crypto/chacha20poly1305
vendor/golang_org/x/text/transform
vendor/golang_org/x/text/unicode/bidi
vendor/golang_org/x/text/unicode/norm
vendor/golang_org/x/net/http2/hpack
vendor/golang_org/x/text/secure/bidirule
mime
mime/quotedprintable
net/http/internal
crypto/x509
net/textproto
os/user
mime/multipart
vendor/golang_org/x/net/idna
github.com/zyedidia/micro/runtime/syntax
# github.com/zyedidia/micro/runtime/syntax
src/github.com/zyedidia/micro/runtime/syntax/syntax_converter.go:157:6: main redeclared in this block
previous declaration at src/github.com/zyedidia/micro/runtime/syntax/syntax_checker.go:11:6
github.com/zyedidia/micro/tools/semver
vendor/golang_org/x/net/http/httpguts
vendor/golang_org/x/net/http/httpproxy
github.com/zyedidia/micro/tools
crypto/tls
# github.com/zyedidia/micro/tools
src/github.com/zyedidia/micro/tools/build-version.go:29:6: main redeclared in this block
previous declaration at src/github.com/zyedidia/micro/tools/build-date.go:8:6
src/github.com/zyedidia/micro/tools/info-plist.go:16:6: main redeclared in this block
previous declaration at src/github.com/zyedidia/micro/tools/build-version.go:29:6
net/http/httptrace
net/http
github.com/zyedidia/micro/cmd/micro
dh_auto_build: cd obj-x86_64-linux-gnu && go install -gcflags=all=\"-trimpath=/home/rajudev/dev/salsa.debian.org/go-team/packages/micro-deb/micro/obj-x86_64-linux-gnu/src\" -asmflags=all=\"-trimpath=/home/rajudev/dev/salsa.debian.org/go-team/packages/micro-deb/micro/obj-x86_64-linux-gnu/src\" -v -p 4 github.com/zyedidia/micro/cmd/micro github.com/zyedidia/micro/cmd/micro/highlight github.com/zyedidia/micro/cmd/micro/shellwords github.com/zyedidia/micro/cmd/micro/terminfo github.com/zyedidia/micro/runtime/syntax github.com/zyedidia/micro/tools github.com/zyedidia/micro/tools/semver returned exit code 2
make: *** [debian/rules:7: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
rajudev@sanganak:~/dev/salsa.debian.org/go-team/packages/micro-deb/micro
The tools directory should not be built as a go package, if you want to use the files there they should be built individually. Ideally you would use the make install command which will handle building and using the tools to set the date and build version.
we have finished building the package for micro. Performing some sanity/quality checks for it. This issue is on the verge of getting closed soon.
Is there any news?
@ShalokShalom We have already uploaded all dependencies of micro to Debian. We have not uploaded micro yet because we are facing a few lintian errors with the package that we are trying to resolve. We should get rid of them very soon(Maybe in the next 2-4 days).
Once we upload it to Debian, I'll notify here.
I see, thanks a lot.
And we are through. We finally got micro in the Debian package upload queue. The package is now listed here https://ftp-master.debian.org/new.html . Once it gets uploaded to Debian Unstable repositories, I'll notify again.
How long does it roughly take until it's uploaded to the debian unstable repositories and when it's there, how can we apt install it?
How long does it roughly take until it's uploaded to the debian unstable repositories and when it's there, how can we apt install it?
It usually takes a lot less. The thing is that we are onto a freeze at the moment because of the upcoming Debian Buster release. It will get uploaded to the Debian repositories after the release of Debian buster.
For you to be installing micro via apt will take atleast 30-45 days. For the derivatives like Ubuntu and others it will be after the next release of Ubuntu in October.
:suspect: :clock4:
Debian Buster is out, so what's the status? https://www.debian.org/releases/buster/
@techtonik It seems that micro was already uploaded a half of year ago, but still waiting for manual process in “new queue” [1].
[1] https://ftp-master.debian.org/new/micro_1.4.1-1.html
Now, this should be processed manually by Debian FTP Masters, so we have to wait more... (and pinging them?)
cc @rajudev
cc @j-rivero and @kyrofa , my local debian/ubuntu representatives :earth_africa: .
I'd love to be able to just apt install this into my linux containers.
@ruffsl I can't help much on Debian's NEW queue I'm afraid, but you do know this is available as a snap, right? Not sure what container tech you're using, but perhaps it's an option.
It's difficult to run snap in a Docker container. Which is unfortunate, because the only time I use a terminal editor is when I edit files in a container. I hope this Debian package gets through eventually.
cc @j-rivero and @kyrofa , my local debian/ubuntu representatives.
I can help with packaging or maintenance but once it is in the NEW queue I'm afraid that we need to wait.
What about running an apt repository? Then you can host the packages yourself. Perhaps it could be a compromise until it trickles into the 'official' repos?
I'll give another update on this in a week or two. Taking a relook at the status in Debian for micro and its dependencies.
Hi all,
Very happy to have this announced,
Micro is in Debian officially :heart:
I'm one of the maintainers and I'd be happy to help if you need any.
For now, micro has entered in unstable, in a couple of days (around 5), it should be there in testing as well! :D
I'd be happy to get this closed now, @zyedidia :100:
Thanks a ton @utkarsh2102 for getting this done.
@rajudev,
Thanks a ton @utkarsh2102 for getting this done.
Well, you did most of the work and you're one of its maintainer, too! :tada:
Thank you for all the work :heart:
Wow, awesome! Can't wait for this to trickle down to buster & Ubuntu.
That's great news! Many thanks for all your work! What's the method for maintaining the version of micro distributed and updating it? I presume it needs to be done manually, but is it something that a non-maintainer like myself could handle?
@zyedidia it will never get to buster as this is a new package and buster is stable. We don't add new packages to stable, only updates and security fixes. It will be in bullseye for sure. It will we available in Debian unstable/sid or testing/bullseye/next though.
I installed micro via apt yesterday night on my Debian unstable system.
@rajudev we can get it to buster-backports after it migrates to testing. And we need to do a source-only upload of all dependencies for them to also migrate to testing.
@zyedidia I guess @rajudev and @utkarsh2102 will keep it updated, but you can also do it if you wish. Updates don't need manual processing by ftp masters, so as soon as we upload, it will be available.
And we need to do a source-only upload of all dependencies for them to also migrate to testing.
That is done as well. Shall backport it once it hits testing.
but is it something that a non-maintainer like myself could handle?
@zyedidia, of course. If you want to help, I can add you to the repository and give you push access there. However, there's a particular workflow that we follow (more or less, you'd need to be familiar with the Debian packaging).
However, one of us can keep the package updated (in sync with the release that you do here). So it'd be great if you can make a release often. Then I can do timely updates of the package in Debian as well :D
When needed, I can ask you once there are bugs that don't seem fix-able to us; maybe you could help us with such things? :)
Good job everyone involved ! :+1: Hope Ubuntu will ship it to 20.04 stable :)
Have waited for this a long time. Great job!
Micro just migrated to testing/bullseye https://packages.debian.org/bullseye/micro there was bug in piuparts used to test packages which caused a delay. Now we can upload it to buster-backports for stable users.
Can't wait to use this in Raspbian!
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
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).
Just noticed #1093 is affecting us, probably updating to newer versions will fix it looking at the comments.
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]
incoming with ubuntu 20.04 ;) https://packages.ubuntu.com/focal/micro
Hi @zyedidia,
This issue can now be closed! \o/
Awesome! How does updating the apt version of micro when there are new releases work?
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
😃
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:
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 :)
@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.
Hear, hear!
I just uploaded micro 2.0.0 to the Debian archive! It can be installed within a few hours now :heart:
Created a PR https://github.com/zyedidia/micro/pull/1506
Updated installation instructions for non-stable releases for Debian and Ubuntu.
Also added a badge to show package version in Debian
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.
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!)
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! :rocket:
Most helpful comment
And we are through. We finally got micro in the Debian package upload queue. The package is now listed here https://ftp-master.debian.org/new.html . Once it gets uploaded to Debian Unstable repositories, I'll notify again.