Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 412201 - app-text/build-docbook-catalog-1.19 calls command flock, but G/FBSD don't have it
Summary: app-text/build-docbook-catalog-1.19 calls command flock, but G/FBSD don't hav...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: Normal normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
: 454792 (view as bug list)
Depends on:
Blocks: new-fbsd-stage
  Show dependency tree
 
Reported: 2012-04-16 11:19 UTC by Yuta SATOH
Modified: 2013-02-07 15:22 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sys-apps/flock-2.21.1.ebuild (flock-2.21.1.ebuild,1.43 KB, text/plain)
2012-05-16 05:18 UTC, Naohiro Aota
Details
patch: flock-2.21.1-makefile.patch (flock-2.21.1-makefile.patch,2.06 KB, patch)
2012-05-16 05:19 UTC, Naohiro Aota
Details | Diff
flock-2.21.1-remove-strmode.patch (flock-2.21.1-remove-strmode.patch,1.53 KB, patch)
2012-05-16 05:19 UTC, Naohiro Aota
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuta SATOH 2012-04-16 11:19:11 UTC
Gentoo/FreeBSD don't have flock command.

Gentoo/Linux result)
$ equery b flock
 * Searching for flock ...
sys-apps/util-linux-2.20.1-r1 (/usr/bin/flock)

Gentoo/FreeBSD result)
$ equery b flock
 * Searching for flock ...


Reproducible: Always

Steps to Reproduce:
1. ACCEPT_KEYWORDS=~x86-fbsd app-text/build-docbook-catalog
2. emerge docbook-xml-dtd

Actual Results:  
>>> Emerging (1 of 1) app-text/docbook-xml-dtd-4.5-r1

<snip>

>>> Installing (1 of 1) app-text/docbook-xml-dtd-4.5-r1
/usr/sbin/build-docbook-catalog: line 71: flock: command not found
build-docbook-catalog: unable to lock /etc/xml, aborting
 * Now removing /etc/sgml/sgml-docbook.cat from /etc/sgml/xml-docbook-4.5.cat and /etc/sgml/catalog
 * Now removing /usr/share/sgml/docbook/xml-dtd-4.5/docbook.cat from /etc/sgml/xml-docbook-4.5.cat and /etc/sgml/catalog
/usr/sbin/build-docbook-catalog: line 71: flock: command not found
build-docbook-catalog: unable to lock /etc/xml, aborting
 * Now adding /etc/sgml/sgml-docbook.cat to /etc/sgml/xml-docbook-4.5.cat and /etc/sgml/catalog
 * Now adding /usr/share/sgml/docbook/xml-dtd-4.5/docbook.cat to /etc/sgml/xml-docbook-4.5.cat and /etc/sgml/catalog

>>> Recording app-text/docbook-xml-dtd in "world" favorites file...
>>> Auto-cleaning packages...
Comment 1 Naohiro Aota gentoo-dev 2012-05-16 05:18:25 UTC
Created attachment 311947 [details]
sys-apps/flock-2.21.1.ebuild

How about adding this ebuild as sys-apps/flock to tree?
Comment 2 Naohiro Aota gentoo-dev 2012-05-16 05:19:05 UTC
Created attachment 311951 [details, diff]
patch: flock-2.21.1-makefile.patch
Comment 3 Naohiro Aota gentoo-dev 2012-05-16 05:19:39 UTC
Created attachment 311953 [details, diff]
flock-2.21.1-remove-strmode.patch
Comment 4 Alexis Ballier gentoo-dev 2012-05-16 12:17:49 UTC
if we want flock we should rather try to build a subset of util-linux
Comment 5 Naohiro Aota gentoo-dev 2012-05-16 15:45:47 UTC
This ebuild build subset of util-linux.
Comment 6 Naohiro Aota gentoo-dev 2012-05-27 06:38:13 UTC
The ebuild patch util-linux code to build only flock and its related files (man pages). 

FreeBSD ports' flock is doing the same thing but with separated tarball, which I don't think much scale.
Comment 7 Richard Yao (RETIRED) gentoo-dev 2012-05-29 13:08:54 UTC
The flock program is just a wrapper for the flock system call. Would anyone be opposed to reimplement this from scratch to avoid the need for the Linux verison?
Comment 8 Alexis Ballier gentoo-dev 2012-05-29 13:17:43 UTC
(In reply to comment #7)
> The flock program is just a wrapper for the flock system call. Would anyone
> be opposed to reimplement this from scratch to avoid the need for the Linux
> verison?

oh no, not at all!
we could also just take flock from util-linux and add it standalone for bsd in a new package
Comment 9 Richard Yao (RETIRED) gentoo-dev 2012-05-29 13:22:55 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > The flock program is just a wrapper for the flock system call. Would anyone
> > be opposed to reimplement this from scratch to avoid the need for the Linux
> > verison?
> 
> oh no, not at all!
> we could also just take flock from util-linux and add it standalone for bsd
> in a new package

Another option would be to modify app-text/build-docbook-catalog-1.19 to call lockf on FreeBSD. That would avoid the need for a separate package.

Reimplementing flock would let us upstream the code for FreeBSD 10 though.
Comment 10 Michael Weiser 2012-08-09 17:36:06 UTC
This also affects prefix portage on Mac OS X. A generic solution would be greatly appreciated. OS X doesn't seem to have lockf either.
Comment 11 Naohiro Aota gentoo-dev 2012-08-18 12:29:10 UTC
(In reply to comment #10)
> This also affects prefix portage on Mac OS X. A generic solution would be
> greatly appreciated. OS X doesn't seem to have lockf either.

Please take a look at my flock ebuild and test if it work on Mac OS X.
Comment 12 Michael Weiser 2012-08-26 12:34:29 UTC
Works nicely as far as the build and install of docbook dtd and xml stylesheets now succeed, the catalog files get installed and amanda can build its manpages with it. Can't tell about the actual locking functionality though.
Comment 13 Yuta SATOH 2013-01-01 08:21:48 UTC
A few days ago, new version of dev-libs/glib has been unmasked.
It's depends on app-text/docbook-xml-dtd.

dev-libs/glib is included in stages, you need to fix this bug before create a new stages.


FYI,
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/profiles/package.mask?r1=1.14333&r2=1.14334

# grep docbook-xml-dtd glib-2.34.3.ebuild
        app-text/docbook-xml-dtd:4.1.2

>>> Installing (1 of 1) app-text/docbook-xml-dtd-4.1.2-r6
 * Removing /usr/lib/systemd
/usr/sbin/build-docbook-catalog: line 71: flock: command not found
build-docbook-catalog: unable to lock /etc/xml, aborting
 * Now removing /etc/sgml/sgml-docbook.cat from /etc/sgml/xml-docbook-4.1.2.cat and /etc/sgml/catalog
 * Now removing /usr/share/sgml/docbook/xml-dtd-4.1.2/docbook.cat from /etc/sgml/xml-docbook-4.1.2.cat and /etc/sgml/catalog
/usr/sbin/build-docbook-catalog: line 71: flock: command not found
build-docbook-catalog: unable to lock /etc/xml, aborting
 * Now adding /etc/sgml/sgml-docbook.cat to /etc/sgml/xml-docbook-4.1.2.cat and /etc/sgml/catalog
 * Now adding /usr/share/sgml/docbook/xml-dtd-4.1.2/docbook.cat to /etc/sgml/xml-docbook-4.1.2.cat and /etc/sgml/catalog

>>> Emerging (1 of 1) dev-libs/glib-2.34.3
<snip>
checking for xsltproc... /usr/bin/xsltproc
checking for XML catalog (/etc/xml/catalog)... found
checking for xmlcatalog... /usr/bin/xmlcatalog
checking for DocBook XML DTD V4.1.2 in XML catalog... not found
configure: error: DocBook DTD is required for --enable-man
Comment 14 Alexis Ballier gentoo-dev 2013-01-31 22:47:37 UTC
*** Bug 454792 has been marked as a duplicate of this bug. ***
Comment 15 Alexis Ballier gentoo-dev 2013-02-07 15:22:07 UTC
sys-apps/flock added from fbsd ports, rdep added to build-docbook-catalog, all should be fine now