I'm trying to put together a minimal emacs rpm and I'm trying this, with the ensuing error:
rpmbuild --rebuild emacs-25.2-3.fc25.src.rpm --without-all rpmbuild: --without-all: unknown option
I untarred the emacs source code and ran ./configure --help and --without- all is an option. I tried a few other config options - rpmbuild doesn't seem to recognize any of them.
In the past I used
rpmbuild --rebuild system-config-network-*.src.rpm --with gui
and it worked. What am I doing wrong now?
Thanks!
On 08/17/2017 07:50 AM, Amadeus W.M. wrote:
I'm trying to put together a minimal emacs rpm and I'm trying this, with the ensuing error:
rpmbuild --rebuild emacs-25.2-3.fc25.src.rpm --without-all rpmbuild: --without-all: unknown option
I untarred the emacs source code and ran ./configure --help and --without- all is an option. I tried a few other config options - rpmbuild doesn't seem to recognize any of them.
In the past I used
rpmbuild --rebuild system-config-network-*.src.rpm --with gui
and it worked. What am I doing wrong now?
I don't know exactly the format for the emacs options.... But looking at the man page for rpmbuild and your examples these 2 would work.
rpmbuild --rebuild system-config-network-*.src.rpm --with gui rpmbuild --rebuild system-config-network-*.src.rpm --without gui
The "gui" is the option going with or without. So....you probably want.
rpmbuild --rebuild emacs-25.2-3.fc25.src.rpm --without without-all ? or maybe "--with without-all"
either way the keywords acceptable for the rpmbuild-options is either --with or --without followed by a space and then the actual option.
On Thu, 17 Aug 2017 08:04:16 +0800, Ed Greshko wrote:
On 08/17/2017 07:50 AM, Amadeus W.M. wrote:
I'm trying to put together a minimal emacs rpm and I'm trying this, with the ensuing error:
rpmbuild --rebuild emacs-25.2-3.fc25.src.rpm --without-all rpmbuild: --without-all: unknown option
I untarred the emacs source code and ran ./configure --help and --without- all is an option. I tried a few other config options - rpmbuild doesn't seem to recognize any of them.
In the past I used
rpmbuild --rebuild system-config-network-*.src.rpm --with gui
and it worked. What am I doing wrong now?
I don't know exactly the format for the emacs options.... But looking at the man page for rpmbuild and your examples these 2 would work.
rpmbuild --rebuild system-config-network-*.src.rpm --with gui rpmbuild --rebuild system-config-network-*.src.rpm --without gui
The "gui" is the option going with or without. So....you probably want.
rpmbuild --rebuild emacs-25.2-3.fc25.src.rpm --without without-all ? or maybe "--with without-all"
either way the keywords acceptable for the rpmbuild-options is either --with or --without followed by a space and then the actual option.
Actually I compiled, out of curiosity, the tar file that came with the srpm, with
./configure --without-all --with-x-toolkit=no --without-x
and worked very well. So these are valid options. Don't know why rpmbuild doesn't like those. It would have been nice to have an rpm but I'll take what I can.
On 08/17/2017 09:22 AM, Amadeus W.M. wrote:
Actually I compiled, out of curiosity, the tar file that came with the srpm, with
./configure --without-all --with-x-toolkit=no --without-x
and worked very well. So these are valid options. Don't know why rpmbuild doesn't like those. It would have been nice to have an rpm but I'll take what I can.
I don't think I was very clear.....
Yes, the options are valid for "configure" and you need to pass those options in the rpmbuild command.
BUT, the option is preceded by the options of rpmbuild and they are....
rpmbuild-options [--buildroot DIRECTORY] [--clean] [--nobuild] [--rmsource] [--rmspec] [--short-circuit] [--build-in-place] [--noprep] [--noclean] [--nocheck] [--target PLATFORM] [--with OPTION] [--without OPTION]
Soo.......you probably need something like this...
rpmbuild --rebuild emacs-25.2-3.fc25.src.rpm --without (a space goes here!!!) without-all
On Thu, 17 Aug 2017 09:30:11 +0800, Ed Greshko wrote:
On 08/17/2017 09:22 AM, Amadeus W.M. wrote:
Actually I compiled, out of curiosity, the tar file that came with the srpm, with
./configure --without-all --with-x-toolkit=no --without-x
and worked very well. So these are valid options. Don't know why rpmbuild doesn't like those. It would have been nice to have an rpm but I'll take what I can.
I don't think I was very clear.....
Yes, the options are valid for "configure" and you need to pass those options in the rpmbuild command.
BUT, the option is preceded by the options of rpmbuild and they are....
rpmbuild-options [--buildroot DIRECTORY] [--clean] [--nobuild] [--rmsource] [--rmspec] [--short-circuit] [--build-in-place] [--noprep] [--noclean] [--nocheck] [--target PLATFORM] [--with OPTION] [--without OPTION]
Soo.......you probably need something like this...
rpmbuild --rebuild emacs-25.2-3.fc25.src.rpm --without (a space goes here!!!) without-all
I tried rpmbuild --rebuild both --with without-all and also --without without-all and it didn't work. I think that would be equivalent to
./configure --with without-all or ./configure --without without-all
respectively. Neither one is valid for configure. I think there's nothing that can be done here.
On 08/17/2017 06:10 PM, Amadeus W.M. wrote:
On Thu, 17 Aug 2017 09:30:11 +0800, Ed Greshko wrote:
On 08/17/2017 09:22 AM, Amadeus W.M. wrote:
Actually I compiled, out of curiosity, the tar file that came with the srpm, with
./configure --without-all --with-x-toolkit=no --without-x
and worked very well. So these are valid options. Don't know why rpmbuild doesn't like those. It would have been nice to have an rpm but I'll take what I can.
I don't think I was very clear.....
Yes, the options are valid for "configure" and you need to pass those options in the rpmbuild command.
BUT, the option is preceded by the options of rpmbuild and they are....
rpmbuild-options [--buildroot DIRECTORY] [--clean] [--nobuild] [--rmsource] [--rmspec] [--short-circuit] [--build-in-place] [--noprep] [--noclean] [--nocheck] [--target PLATFORM] [--with OPTION] [--without OPTION]
Soo.......you probably need something like this...
rpmbuild --rebuild emacs-25.2-3.fc25.src.rpm --without (a space goes here!!!) without-all
I tried rpmbuild --rebuild both --with without-all and also --without without-all and it didn't work. I think that would be equivalent to
./configure --with without-all or ./configure --without without-all
respectively. Neither one is valid for configure. I think there's nothing that can be done here.
You have to bugger the spec file to accommodate conditionals. Using the
rpmbuild ... --with fnork
(note the space between "with" and "fnork) will cause an rpmbuild macro, "_with_fnork" to be created with the value "--with-fnork". To use this macro, you have to modify your spec file to something like:
./configure \ %{?_with_fnork} \ --with-somethingelse \ ...
With that change in place in the spec file, had you done
rpmbuild ... --with fnork
then the configure would have been run as:
./configure \ --with-fnork \ --with-somethingelse \ ...
And if you had NOT included "--with fnork" on the rpmbuild command:
./configure \ --with-somethingelse \ ...
The construct "%{?_with_fnork}" in the spec file means "if the macro '_with_fnork' is defined (via "--with fnork" on the command line), use its value. Otherwise use null."
There is a parallel using "--without fnork" (creating a "_without_fnork" macro with the value "--without-fnork"). Yes, it's a bit obtuse. For the gory details:
http://rpm5.org/docs/api/conditionalbuilds.html
Hope that helps. rpmbuild and spec files often make my brain bleed-- especially the "%files" section. I'm getting queasy just thinking of it! ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@alldigital.com - - AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 - - - - "Microsoft is a cross between The Borg and the Ferengi. - - Unfortunately they use Borg to do their marketing and Ferengi to - - do their programming." -- Simon Slavin - ----------------------------------------------------------------------
Amadeus W.M. wrote:
Actually I compiled, out of curiosity, the tar file that came with the srpm, with
./configure --without-all --with-x-toolkit=no --without-x
and worked very well. So these are valid options. Don't know why rpmbuild doesn't like those. It would have been nice to have an rpm but I'll take what I can.
So far as I know (and I could always be wrong or unaware), the --with/--without options to rpmbuild set macros in the spec file. Those are not automatically passed to the %configure macro which is often used to build GNU software which uses ./configure.
If you want to pass configure options you'll need to edit the emacs spec file to set them. You could modify the spec so that the --with/--without options do get passed into ./configure, as noted here:
http://rpm.org/user_doc/conditional_builds.html
If you're just looking to quickly rebuild emacs it might well be simpler to just add/remove the option in the %configure section than it would be to add support for passing it in via rpmbuild.
On Wed, Aug 16, 2017 at 4:50 PM, Amadeus W.M. amadeus84@verizon.net wrote:
I'm trying to put together a minimal emacs rpm and I'm trying this, with the ensuing error:
rpmbuild --rebuild emacs-25.2-3.fc25.src.rpm --without-all rpmbuild: --without-all: unknown option
Looking at the emacs spec (available at https://src.fedoraproject.org/rpms/emacs/tree/master), I don't see any "with" options defined for this package, so there's no way to specify such options, nor any way to pass options to ./configure.
The normal build produces a "nox" version. If that's not what you mean by minimal, then you can install (rpm -i) the src.rpm and then edit the spec. Locate the "./configure" line and make the changes you require, there. Build the package as normal, but anticipate that you might need to adjust the %files section if rpm tells you that files are missing, and rebuild again.
On 08/17/2017 07:14 PM, Gordon Messmer wrote:
On Wed, Aug 16, 2017 at 4:50 PM, Amadeus W.M. amadeus84@verizon.net wrote:
I'm trying to put together a minimal emacs rpm and I'm trying this, with the ensuing error:
rpmbuild --rebuild emacs-25.2-3.fc25.src.rpm --without-all rpmbuild: --without-all: unknown option
Looking at the emacs spec (available at https://src.fedoraproject.org/rpms/emacs/tree/master), I don't see any "with" options defined for this package, so there's no way to specify such options, nor any way to pass options to ./configure.
Thanks for the link. Looking at that, the spec file would need to be modified:
%configure --with-dbus --with-gif --with-jpeg --with-png \ --with-rsvg --with-tiff --with-xft --with-xpm \ --with-x-toolkit=gtk3 --with-gpm=no --with-xwidgets \ --with-modules %{?_with_all}
and rpmbuild invoked as:
rpmbuild ... --with all ...
(note the space between "with" and "all"). I think that's what's needed.
I don't know it's necessary as the "--with-modules" looks like it'd build pretty much everything, but I don't use emacs often and wouldn't use any of its "sophisticated" features. I administer a LOT of machines and I can generally rely on having vi/vim installed. Emacs...not so much. ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@alldigital.com - - AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 - - - - "The bogosity meter just pegged." - ----------------------------------------------------------------------
On 08/18/2017 09:47 AM, Rick Stevens wrote:
Thanks for the link. Looking at that, the spec file would need to be modified:
%configure --with-dbus --with-gif --with-jpeg --with-png \ --with-rsvg --with-tiff --with-xft --with-xpm \ --with-x-toolkit=gtk3 --with-gpm=no --with-xwidgets \ --with-modules %{?_with_all}
and rpmbuild invoked as:
rpmbuild ... --with all ...
(note the space between "with" and "all"). I think that's what's needed.
I'm mostly sure you also need to add a "bcond" statement, and you'll *probably* spend some time massaging the file lists.
http://rpm.org/user_doc/conditional_builds.html
If you need to remove some of the flags currently passed to configure, you'd need to keep the existing configure command inside a conditional statement, and your minimal configure command in its "else" clause.
If this is your first foray into spec files, you're probably better off just making the changes you want, directly.