How to build a package from local source keeping all the original used (gnu autotools) build options !??
lsrbreda at xs4all.nl
Wed Aug 19 06:07:25 UTC 2020
Yep I am using outlook 😊 doing ..... clever things ...... Not only outlook by the way ..... no idea what this forum mailing system is doing, but the layout of the mail here is ..... terrible ..... not at all the intended layout !!
But back to the problem, what I IMHO has been doing, seems quite logical.
Starting with the "maintainer part" ("maintainer process")
- sources are coming from GitHub, I did some local modifications
- so I am using the local git tree as the development tree
- generating a distribution file there
Than I distribute to port to generate the package to "OS package maintainers" ("package build process")
- and yep it is on the same computer, but what is wrong with that ....
Like you wrote, I probably need to build with ports itself. Which breaks the whole idea of distribution files / responsibility separation IMHO!! ☹ ☹
I am worried .... The package is designed to use "GNU-autotools options .... not to use port options ....
does port allow to build the same way .... as does autotools does ?? does ./autogen.sh
./configure – option-A=/abc – option-B=/def etc (*required*)
work in ports !!??!!!
May be there is no problem, have to find out. May be you are willing to help here.
Assume I copy the whole source from my git directory to "what ever other directory on my computer", which commands should I use to get the intended result ...........
PS Alternative, could be to change the way that the distribution file is generated ........
do not know how to do that ☹
.... and it is surely related, but I think different subject !!
From: owner-freebsd-questions at freebsd.org <owner-freebsd-questions at freebsd.org> On Behalf Of Polytropon
Sent: Wednesday, August 19, 2020 4:18 AM
To: louis.forums at xs4all.nl
Cc: louis.forums at xs4all.nl <lsrbreda at xs4all.nl>; freebsd-questions at freebsd.org
Subject: Re: How to build a package from local source keeping all the original used (gnu autotools) build options !??
On Tue, 18 Aug 2020 21:44:54 +0200, louis.forums at xs4all.nl wrote:
Something is wrong with your mailer - it damaged commands so they become incorrect - oh, never mind, "Microsoft Outlook", let's see if I can fix that a bit. ;-)
> After downloading a project from GitHub and making some changes, I can
> build and install that project using the GNU autotools
> cd /var/git/<project>
> ./configure – option-A=/abc – option-B=/def etc (*required*
That is probably a case of "smart substitution" where you want to have "--", but got "– ", and I have no idea what " " could have been in your original input (it appears in many places).
> make install
> make dist
> However than I need to make a distribution package for that project
> cp /var/git/<project>/<distfile> cd /usr/ports/<distfiles>
> cd /usr/ports/<category>/<project>
At this point, all make commands will use the options set for the port - which have not been set yet, i. e., the default port options will apply (as you have noticed in the result).
The reason is that you built source outside (!) of the ports tree, and you set those options outside of the tree with means that are not part of the "ports options framework".
> make makesum
> make stage
> make stage-qa
> make package
> That however does not work in the right way.
As I said, it works in the _intended_ way.
What you would need to do is to obtain the sources you need, usually by getting the most recent version of the ports tree (using svn), and then use "make config" so the ports framework can store the options.
If you need sources that are _different_ from those provided by the ports collection, you could try to copy the source tree obtained by git into the work/ subdirectory of the port.
> The problem is that “Port” is building the sources *again* (in cd
> And more severe …. It is building the package without and
> *required* options ……. (the same as defined for the original build!)
That is exactly how it is supposed to work. :-)
> So my question: “is how to build an package having the same build
> settings as in the original autotools build”
> (using same generated makefile, config etc.)
It might sound strange, but you're trying a "non-supported thing", which doesn't mean it couldn't work. As I mentioned, try to use the generated source tree, copied into the ports tree, from within (!) the ports tree, by revisiting the "make config"
screen to make sure all options are met as intended.
> Perhaps !!?? the whole rebuild process by the port-tools is not
> required at all (just my feeling(!)
The rebuild will only be performed if an existing package does not meet the requirements of the options set (option mismatch) or if the version is different (version mismatch). In any other cases, existing built and/or installed packages will be kept.
So the ports framework has no idea of which options have been applied to the files now available in distfiles/, that's why it needs to rebuild the (unsuited, because default option) packages as they do not exist yet.
The best idea here probably is to use "ports only" as a means to build stuff to avoid both version mismatch and options mismatch.
> If port could!!?? only do all the packaging stuff for the already
> build files! ☹ 😊
That is probably possible. Have you looked into poudriere?
For a "one-time action", using the regular ports tree might be okay, but if you're going to do updating and rebuilding more than once, maybe dedicating a poudriere installation with your custom options would be more convenient on the long run.
I hope I did understand your intentions correctly.
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
freebsd-questions at freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions