Package Details: bsdmainutils 12.1.7-1

Git Clone URL: (read-only, click to copy)
Package Base: bsdmainutils
Description: Some BSD-style programs including ncal and lorder.
Upstream URL:
Licenses: GPL
Submitter: None
Maintainer: zancarius
Last Packager: zancarius
Votes: 33
Popularity: 0.42
First Submitted: 2011-04-29 15:21 (UTC)
Last Updated: 2021-02-14 21:41 (UTC)

Latest Comments

aureascala commented on 2022-01-04 13:08 (UTC)

Unfortunately the ncal version included in this package computes the week number incorrectly. For 2022 in my Manjaro installations using this package, ncal -w -h gives:

    Jänner 2022       
Mo     3 10 17 24 31
Di     4 11 18 25   
Mi     5 12 19 26   
Do     6 13 20 27   
Fr     7 14 21 28   
Sa  1  8 15 22 29   
So  2  9 16 23 30   
    1  2  3  4  5  6

This is wrong, because the week of the 1st of January 2022 should be week 52 according to ISO 8601. On my Chromebook as well as under Raspberry Pi OS the same command correctly outputs:

    January 2022      
Mo     3 10 17 24 31
Tu     4 11 18 25   
We     5 12 19 26   
Th     6 13 20 27   
Fr     7 14 21 28   
Sa  1  8 15 22 29   
Su  2  9 16 23 30   
   52  1  2  3  4  5

Thanks for looking into this.

zancarius commented on 2017-12-11 17:47 (UTC)

I caught a comment late last night that doesn't appear to be on here anymore (not sure if it was deleted?). It was posted by a French user who shared the following error during build (error message is posted below as it was originally submitted to me):

Le patch debian/patches/fix-big-1stweek.patch est maintenant au sommet
patching file usr.bin/ncal/Makefile
patching file usr.bin/ncal/Makefile
cc -include ../../freebsd.h  -march=x86-64 -mtune=generic -O2 -pipe
-fstack-protector-strong -fno-plt -c -o calendar.o calendar.c
calendar.c:38:10: erreur fatale: bsd/stdlib.h : Aucun fichier ou
dossier de ce type
 #include <bsd/stdlib.h>
compilation terminée.
make[1]: *** [../../ calendar.o] Error 1
make: *** [Makefile:11: all] Error 2

I'm pretty sure I missed a dependency required for bsdmainutils, both build and possibly runtime, and have corrected that in the latest pkgrel. If you're receiving a similar error regarding the inclusion of bsd/stdlib.h, that would be why (libbsd needs to be installed).

I would like to thank the user who submitted this error report. Because the original post is no longer visible below, and because I don't know if the submitter deleted it themselves, I'm reluctant to thank them directly for privacy reasons. If they post again, I'll update this comment.

zancarius commented on 2017-11-04 01:19 (UTC)

Thanks for reporting this, Alfredo. Turns out my first comment was wrong. I expected that was probably the case as I made it in haste and hadn't taken the time to examine the situation closely. The build issues reported were probably related to (recent?) changes in ncurses. It appears that the symbols upstream expects in ncurses may have been split out into libtinfo, so adding -ltinfo to ncal's Makefile was all that was needed. quilt is now require for building because stateful patch management is necessary to apply everything cleanly. The previous incantation of this package applied the patches manually which worked for a while, so I'm hoping by following Debian's build process a bit more closely, it'll resolve future issues as well. I'm mostly adding this comment in case anyone runs into this or similar issues in the future on other non-Debian platforms. I can't guarantee this assessment is correct, but the symbols have definitely moved into tinfo.

alfredo.ardito commented on 2017-11-03 07:55 (UTC)

Perfect, works after last commit! Thx

zancarius commented on 2017-11-02 21:30 (UTC)

Upstream has released an update as of about a week ago, but the update is also broken for GCC 7.2.0. I'll look into it and see if I can fix it or find a patch (patches are welcome). In the meantime, I'd suggest skipping this package (or uninstalling it) if you're updating AUR packages such as via yaourt. I can't give an ETA on when it'll be fixed.

zancarius commented on 2017-11-02 21:14 (UTC)

Looks like this may be due to glibc changes. I'll check the upstream package and see if it's been updated and then investigate further.

alfredo.ardito commented on 2017-11-02 21:10 (UTC) (edited on 2017-11-02 21:12 (UTC) by alfredo.ardito)

Error building. Got this error: --------------------------------- ncal.o: In function `highlight': ncal.c:(.text+0x9ec): undefined reference to `tgetent' ncal.c:(.text+0xa14): undefined reference to `tgetstr' ncal.c:(.text+0xa2b): undefined reference to `tgetstr' collect2: error: ld returned 1 exit status make[1]: *** [../../ ncal] Error 1 make: *** [Makefile:11: all] Error 2 ==> ERROR: A failure occurred in build(). Aborting... ==> ERROR: Makepkg was unable to build bsdmainutils. ==> Restart building bsdmainutils ? [y/N] ==> -------------------------------------

zancarius commented on 2017-06-12 22:47 (UTC)

I changed the architecture to "any" so it matches upstream. It should build now without manual intervention. There's a new version I need to update the package to (9.0.12), but I'll probably get to that later tonight. The patch warnings shouldn't be an issue. Those are distributed upstream, so if it causes a problem, the Ubuntu maintainers would be the ones to get in touch with (it'd be a bug). If not, then there's nothing to worry about! :)

alkaline commented on 2017-06-09 11:26 (UTC) (edited on 2017-06-09 11:26 (UTC) by alkaline)

I manually added "armv7h" to PKGBUILD and was able to built and install the package. > makepkg -si Everything seems ok, though there were a couple of lines in the log that look odd. Don't know if relevant, e.g.: ... patching file usr.bin/column/column.c Hunk #1 succeeded at 76 (offset -3 lines). Hunk #2 FAILED at 100. Hunk #3 succeeded at 120 (offset -6 lines). Hunk #4 succeeded at 294 (offset -37 lines). 1 out of 4 hunks FAILED -- saving rejects to file usr.bin/column/column.c.rej patching file usr.bin/column/column.1 Hunk #1 FAILED at 40. Hunk #3 FAILED at 80. 2 out of 3 hunks FAILED -- saving rejects to file usr.bin/column/column.1.rej patching file usr.bin/column/column.c ...

zancarius commented on 2017-06-08 17:16 (UTC)

I'm somewhat reluctant to add architectures I don't have access to, but it also appears that upstream has it tagged as "any." Have you successfully built this package using either `makepkg -A` (to ignore the arch) or by manually adding "armv7h" to the `arch` array?

alkaline commented on 2017-06-08 12:05 (UTC)

Can you please support more architectures, e.g. 'armv7h'? thanks

zancarius commented on 2014-11-03 06:10 (UTC)

Thanks, delta48. It should have read that from the start, but didn't. I suspect I didn't catch it because I hadn't tested installing it via an AUR helper and it otherwise builds correctly (it won't when something like yaourt attempts to install it, however). Hopefully that's the last major artifact from previous versions. The only major clean up remaining at this point is to fix the patch applications that fail. Anyway, updated.

delta48 commented on 2014-11-03 05:49 (UTC)

i got an error in this line patch -Np1 < ../../archlinux-ncal.diff changed to patch -Np1 < ../archlinux-ncal.diff and it work

zancarius commented on 2012-12-17 00:03 (UTC)

Reason? None that I can think of other than my oversight since I mostly adopted this package for ncal (which I like). I apologize for that as I believe they weren't installed from the original PKGBUILD. I probably should have noticed these were missing. It should be fixed now as it installs everything, although the calendar files must currently be stored in /etc/calendar. I don't consider this optimal, but without looking into it more than a grep or two, I can only surmise it'll require some patches to calendar. Since the package is sourced from Ubuntu, it does contain some Debian-specific changes (these are located in /etc/calendar/debian if you prefer them over the defaults). The best option might be to include an install file that generates some symlinks from /etc/calendar to the appropriate location. I'll have to think about it. The /etc/calendar/default includes everything but something like: calendar -f /etc/calendar/calendar.usholiday -l 30 Should work to specify your region if it's included. If there's anything else missing, let me know.

chneukirchen commented on 2012-12-16 22:11 (UTC)

Any reason the calendar files are not installed?

zancarius commented on 2012-07-15 07:26 (UTC)

No worries. :) I'll likely remove the superfluous comments next time the upstream package is updated.

sacarde commented on 2012-07-15 06:49 (UTC)

sorry, I did not see that was a link thanks

zancarius commented on 2012-07-15 03:09 (UTC)

@sacarde I'm not sure why you'd need the "hd" binary from this package (which symlinks to hexdump), because it's already part of util-linux. If you edit the PKGBUILD I uploaded, you can have it install that utility as well. Pay careful attention to the comments in build().

sacarde commented on 2011-12-24 08:29 (UTC)

hi, is possible to have program: "hd" in this package? tanks

commented on 2011-08-27 02:51 (UTC)

Thanks, I have fixed it.

andreagi commented on 2011-08-19 22:50 (UTC)

Hi, I'm really addicted to the ncal command, so I was a bit disappointed in not finding it. The "install" target makes a symbolic link to "cal" (and this is a problem), I wrote a patch to remove only these instructions: this way the standard "cal" can happily cohabit together with the "ncal" on my installation. I put this patch in the same directory of PKGBUILD: === archlinux-ncal.diff ======================================================================= diff -Naur ubuntubsdmainutils/usr.bin/ncal/Makefile archlinuxbsdmainutils/usr.bin/ncal/Makefile --- ubuntubsdmainutils/usr.bin/ncal/Makefile 2010-11-28 14:23:02.000000000 +0100 +++ archlinuxbsdmainutils/usr.bin/ncal/Makefile 2011-08-20 00:24:28.634337652 +0200 @@ -6,6 +6,3 @@ topdir=../.. include $(topdir)/ -install-2: - (cd $(bindir); ln -sf ncal cal) - (cd $(mandir); ln -sf ncal.1 cal.1) =============================================================================================== and I changed the PKGBUILD to use it: === PKGBUILD ================================================================================== # Contributor: Tusooa Zhu <> pkgname=bsdmainutils pkgver=8.2.2 pkgrel=3 pkgdesc="Some BSD-style programs." arch=('i686' 'x86_64') url="" license=('GPL') depends=() makedepends=(make) source=($pkgname/${pkgname}_$pkgver.tar.gz archlinux-ncal.diff) build() { cd "$srcdir/$pkgname-$pkgver" msg "Starting make..." for i in debian/patches/* ; do patch -Np1 < "$i" ; done || return 1 patch -Np1 < ../../archlinux-ncal.diff for i in col colcrt colrm column hexdump look ul ; do rm -rf usr.bin/"$i" ; done || return 1 make && make DESTDIR="$pkgdir" install || return 1 } md5sums=('e884ca823d4d04efa1de596446ecb65f' '1c32a629d33fa4c5ca9f1ddccce717b4') ===============================================================================================