Skip to content

Specify RPM tag Source0 as a downloadable URL#116

Merged
michaelherger merged 1 commit into
LMS-Community:public/9.2from
mavit:source0-as-url
Jul 8, 2026
Merged

Specify RPM tag Source0 as a downloadable URL#116
michaelherger merged 1 commit into
LMS-Community:public/9.2from
mavit:source0-as-url

Conversation

@mavit

@mavit mavit commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

This makes it easier to build the RPM using a more conventional RPM building workflow, if one prefers to do that instead of relying on buildme.pl.

This makes it easier to build the RPM using a more conventional RPM building workflow, if one prefers to do that instead of relying on `buildme.pl`.

Signed-off-by: Peter Oliver <git@mavit.org.uk>
Comment on lines +79 to +83
%if %{with release}
Source0: https://downloads.lms-community.org/LyrionMusicServer_v%{version}/%{src_basename}-%{version}.tgz
%else
Source0: https://downloads.lms-community.org/nightly/%{src_basename}-%{version}-%{_revision}.tgz
%endif

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh?!? Are you trying to pull down the tarball from online, instead of using a local file? That file might not exist yet at this point.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unintuitively, if a Source tag contains a URL, rpmbuild will just use its basename. In other words, from rpmbuild's point of view, the above is entirely equivalent to:

%if %{with release}
Source0:	%{src_basename}-%{version}.tgz
%else
Source0:	%{src_basename}-%{version}-%{_revision}.tgz
%endif

Why change it, then? Because other tools can use the whole URL. For example, you could fetch sources with, e.g.,

spectool -gR redhat/lyrionmusicserver.spec

Some build systems, such as Copr, do this automatically as the first stage of the build.

My short term goal here is to make it slightly easier for me to work on the RPM in a way that I'm used to.

My longer term goal is to enable a future where we could generate the nightly tarball here with GitHub Actions as at present, then ping Copr to build RPMs for us specific to each CPU architecture, Perl version, etc.. It would put the resulting packages into easily consumable repositories from which users could get automatic updates along with the rest of their OS.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And currently that would use a local copy of that tarball to build the RPM locally? That would be fine then. I guess we'd see failure quickly if not 😉.

Comment thread buildme.pl
Comment on lines +630 to 638
print "INFO: Building $buildDir/$destName.tgz for the RPM...\n";

buildTarball($dirsToExcludeForRPM, "$buildDir/$defaultDestName");
buildTarball($dirsToExcludeForRPM, "$buildDir/$destName");

## We already built a tarball, so now lets use it...
print "INFO: Moving $buildDir/$defaultDestName.tgz to $buildDir/rpm/SOURCES...\n";
system("mv $buildDir/$defaultDestName.tgz $buildDir/rpm/SOURCES");

print "INFO: Moving $buildDir/$destName.tgz to $buildDir/rpm/SOURCES/...\n";
system("mv $buildDir/$destName.tgz $buildDir/rpm/SOURCES/");
## Copy the various SPEC< Config, etc files into the right dirs...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain this part of the change? It's using the fully formatted file name (including version etc.) rather than just the lyrionmusicserver?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right. This is so that we create the tarball with a name that matches the basename of the URL in Source0.

@michaelherger

Copy link
Copy Markdown
Member

Thanks! Let's give this a try. Please check in 36h or so whether we'll get tomorrow's build or not.

@michaelherger michaelherger merged commit df5c3c9 into LMS-Community:public/9.2 Jul 8, 2026
1 check passed
@mavit mavit deleted the source0-as-url branch July 9, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants