Commit Graph

146 Commits

Author SHA1 Message Date
brian m. carlson
88dda4deca
release: v3.5.0 2024-02-26 21:16:26 +00:00
Chris Darroch
685801ed6e debian,rpm: update project home page URL
The project home page for Git LFS was moved to https://git-lfs.com/
from https://git-lfs.github.com/ last year, so we now update our
Debian and RPM package metadata to refer to the new home page URL.
2023-10-18 14:26:01 -07:00
Chris Darroch
1e001d1a8e rpm: remove unused repo package build sources
Since commit git-lfs/build-dockers@d4c2fe6f79
the centos_script.bsh script in that repository has not built the
"repository configuration" or "repo" RPM packages, which were intended,
it seems, to contain extra packages and GPG signatures for Git LFS.

We can therefore remove the stale RPM spec and source files which
pertained only to this extra RPM build, and also some lines in the
rpm/build_rpms.bsh which created an empty stub GPG key file for this
build.
2023-10-18 14:22:03 -07:00
Chris Darroch
8994edda1b release: v3.4.0 2023-07-20 13:52:25 -07:00
Chris Darroch
7830f046e7 rpm/build_rpms.bsh: also build i686 RPMs
In commit c2d25ee6b6d89425cf39dbc3be7a215d3d0fc050 of PR #511 we added
support for building RPM packages for 32-bit platforms by updating the
docker/centos_script.bsh script which was present at that time to
call rpmbuild with a --target=i686 argument.

Since commit 56ffe420b787ba2f738287e07d6af9f177e51b4f of PR #555 both
that script and the rpm/build_rpms.bsh script contained the same logic
to parse the OS name and version in order to set a short suffix for
the RPM filenames.

However, the docker/centos_script.bsh script was subsequently moved into
the git-lfs/build-dockers repository, where it has not been updated to
match the rpm/build_rpms.bsh script, such as when parsing of the OS major
version was added in commit e93940960ee0e1749a2de6616150cd10061b18e2 of
PR #5054, which allows us to properly parse the version number on
CentOS/Rocky Linux 8 and above, or when parsing of the Rocky Linux OS
name was added in commit 723be34bd0e9802c0dc5fa728edf86cc16bc62b0 of
PR #5144.

The result is that at present we build 32-bit RPMs for CentOS 8 and
Rocky Linux 9 (el8 and el9, respectively) without the platform short
name suffix in their filenames, e.g., git-lfs-3.3.0-1.i686.rpm and
git-lfs-3.3.0-1.i686.rpm, and then upload them to Packagecloud with
those names.

To resolve this problem and avoid later regressions between the two
sets of parsing logic, we move the rpmbuild command for 32-bit packages
into our rpm/build_rpms.bsh script, which ensures they will be built
with the same context as our 64-bit packages.

To do this we introduce an rpmbuild command with the --target=i686
argument into rpm/build_rpms.bsh, which allows us to also remove
the rpmbuild command from the centos_script.bsh script in the
git-lfs/build-dockers repository in PR git-lfs/build-dockers#54.
2022-12-28 01:11:23 -08:00
Chris Darroch
ba6f2789dc rpm/clean.bsh: drop CentOS 6 repo clean script
Since the original introduction of support for building CentOS RPMs
in commit 4a7162777913489e7c70a3da3235dcd3eeec553b of PR #332, an
rpm/clean.bsh script has been provided to perform the equivalent of
a "git clean -xdf" command on the Git repository from which we build
Git LFS.

However, this script is no longer needed as all of the CentOS and
Rocky Linux container image builds have a native Git package installed,
and so we remove the only use of it, in the centos_script.bsh script
of the git-lfs/build-dockers project, in commit
git-lfs/build-dockers@7be51a4ddd of
PR git-lfs/build-dockers#54, and can therefore also drop the
script from this repository as well.
2022-12-28 01:09:47 -08:00
Chris Darroch
47644a6d1e rpm/build_rpms.bsh: drop unused NODEPS variable
In commit e2f770c8f5f2251976a83a5983c9ce170a764884 of PR #428
the rpm/build_rpms.bsh script was updated to run the rpmbuild command
with the --nodeps option when the NODEPS environment variable was defined
and set non-zero.

However, in commit 88430de792d96ec74846779aeb0530a4fb1ff49a of PR #654
the script was revised to always pass the --nodeps option to the
rpmbuild command, so the NODEPS environment variable no longer had
any effect, and so We can therefore remove our handling of this variable.
2022-12-28 00:09:59 -08:00
Chris Darroch
672f9cc94a rpm/build_rpms.bsh: use SPEC variable throughout
The SPEC variable is currently set with the relative path to our
git-lfs.spec file, but is then not used in places where it could be,
so we replace those with references to the variable.
2022-12-28 00:09:59 -08:00
Chris Darroch
d5e0ffc9e5 docker/README.md,rpm/INSTALL.md: update rpm docs
We no longer support either CentOS 5 or 6, per commit
b560b853a6e557195c0c68875218f45c89dce56b of PR #1298 and commit
git-lfs/build-dockers@64a3a9fc4d
of PR git-lfs/build-dockers#3, and commit
git-lfs/build-dockers@898d9b045e
of PR git-lfs/build-dockers#33.

We also now build the Asciidoctor Ruby gem in order to generate
our man pages, rather than using ronn and several other gems,
per commit db9a82132a2bb066876d8ddf06c5255da2f199a4 of PR #5054.

We therefore update the documentation for our RPM package build
utilities and for our Docker container image build utilities to
reflect these changes.
2022-12-28 00:09:59 -08:00
Chris Darroch
362371477a rpm/build_rpms.bsh: tidy Asciidoctor gem install
In commit db9a82132a2bb066876d8ddf06c5255da2f199a4 of PR #5054 we
replaced our use of ronn with Asciidoctor, and as part of that change
we updated our rpm/build_rpms.bsh script to only install the
Asciidoctor Ruby gem instead of a set of four gems including one
for ronn.

As a consequence we no longer have any x86_64 Ruby gem RPMs but only
"noarch" ones, so we can simplify our installation slightly, and
also update our status messages to reflect that we are installing
just one gem.
2022-12-28 00:09:59 -08:00
Chris Darroch
124f2fe6f8 rpm/build_rpms.bsh: drop unused package installs
Since the original introduction of the rpm/build_rpms.bsh script in
commit 4a7162777913489e7c70a3da3235dcd3eeec553b of PR #332 it has
installed a number of packages, including make, curl, tar, and bison.

Then in commit a4c9db890e19a6b70451db99b8db622e5af8997a of PR #480 the
perl-Digest-SHA package was added as an install target as well.

However, we no longer need to install any of these, either because the
are already installed by our CentOS and Rocky Linux Dockerfiles in
our git-lfs/build-dockers project, or because they are simply unused
at present, so we remove these packages now.
2022-12-28 00:09:59 -08:00
Chris Darroch
3d23279bb3 rpm: drop Ruby 2.x install and spec file
In commit git-lfs/build-dockers@544e07ee1a
of PR git-lfs/build-dockers#47 we updated our CentOS 7 Dockerfile to
install Ruby 3.0 using the rh-ruby30-{ruby,build} packages and then run
our CentOS build script with that version of Ruby as the default.  We made
this change to support our use of Asciidoctor in preference to ronn,
which was completed in PR #5054, and as part of that PR, in commit
db9a82132a2bb066876d8ddf06c5255da2f199a4 we replaced our installation of
ronn with one of asciidoctor in our rpm/build_rpms.bsh script.

As a result, none of our CentOS or Rocky Linux container image builds
now rely on Ruby 2.x, so we can remove the code which installed that
version.

We can also remove the related code which used to install Ruby 2.x when
an even older version was the default, along with our local ruby.spec
file for Ruby 2.2.2.

Finally, we can remove the code which installed the rubygems-devel
package on CentOS 8 because that is taken care of by the corresponding
Dockerfile in our git-lfs/build-dockers project, which, like the
one for Rocky Linux 9, installs ruby, ruby-devel, and rubygems-devel.
2022-12-28 00:09:43 -08:00
Chris Darroch
60dafc2ab6 rpm/build_rpms.bsh: drop CentOS 5/6 Go install
Since the original introduction of the rpm/build_rpms.bsh script in
commit 4a7162777913489e7c70a3da3235dcd3eeec553b of PR #332 it has
checked for the absence of the "go" binary and, if it is not found,
installs the golang package, except on CentOS 5 where fetches and
patches a golang.spec file and then builds a local RPM using that
in order to install Go.

However, in commit b560b853a6e557195c0c68875218f45c89dce56b of PR #1298 and
in commit git-lfs/build-dockers@64a3a9fc4d of
PR git-lfs/build-dockers#3 we dropped support for CentOS 5.

And in commit 88430de792d96ec74846779aeb0530a4fb1ff49a of PR #654 we
updated our CentOS Dockerfiles (before they were moved to the
git-lfs/build-dockers repository) to download and install Go from the
googleapis.com service, and we still continue to do this but as of
commit git-lfs/build-dockers@c63850354e
in PR git-lfs/build-dockers#35 we now use the golang.org service.

This direct download obviates the logic in our rpm/build_rpms.bsh
script to install the golang package, and the special handling for
CentOS 5 is also obsolete, so we remove this logic from our script.
2022-12-27 19:44:30 -08:00
Chris Darroch
84bc27e7b3 rpm/build_rpms.bsh: drop CentOS 5/6 Git install
In commit cd3e92e947fcc9c43ddc932226c155731cd00978 of PR #480 we
introduced support for CentOS 6 into our rpm/build_rpms.bsh script by
building an early version of Git from a local git.spec file.  Then in
commit d2d90a801a98cc9789e691e8c43251c51ce0b333 of PR #891 this was
replaced with installation from the setup.ius.io service.

In commit git-lfs/build-dockers@7af55520c6
of PR git-lfs/build-dockers#19, however, the download and installation
of Git 2.16 from github.com was added to the CentOS 6 Dockerfile; later
this was adjusted to download from kernel.org.

In commit git-lfs/build-dockers@f1f573fd5b
of PR git-lfs/build-dockers#29 we added support for CentOS 8, which
supports a direct installation of Git using yum.

And in commit git-lfs/build-dockers@898d9b045e
of PR git-lfs/build-dockers#33 we dropped support for CentOS 6 entirely.

Therefore we no longer have any need for our rpm/build_rpms.bsh script
to install Git at all, especially not very old versions, so we simply
remove that logic from our script.
2022-12-27 19:44:30 -08:00
Chris Darroch
38a0f9f09f rpm/build_rpms.bsh: drop CentOS 5 EPEL install
In commit b560b853a6e557195c0c68875218f45c89dce56b of PR #1298 and in
commit git-lfs/build-dockers@64a3a9fc4d of
PR git-lfs/build-dockers#3 we dropped support for CentOS 5, so we can
remove the logic in our rpm/build_rpms.bsh which installed a RedHat
EPEL package only on this platform.
2022-12-27 19:44:30 -08:00
Chris Darroch
7b3dcdd936 rpm/build_rpms.bsh: drop old OS release parsing
Our rpm/build_rpms.bsh script currently attempts to parse the
/etc/os-release file to retrieve the major OS version number, and
if that file does not exist, reads /etc/redhat-release instead;
the latter logic has been in place since the introduction of the
script in commit 4a7162777913489e7c70a3da3235dcd3eeec553b of
PR #332, and has been the fallback logic since commit
56ffe420b787ba2f738287e07d6af9f177e51b4f of PR #555.

However, /etc/os-release should exist on all the current versions
of CentOS and Rocky Linux we support, so we do not need to retain
the fallback parsing of /etc/redhat-release at this point.
2022-12-27 19:44:30 -08:00
brian m. carlson
4226abf8dc
release: v3.3.0 2022-11-28 19:19:14 +00:00
brian m. carlson
448eddb22a
Add the FAQ to the documentation
We generally get a lot of requests for problems that are already
answered in the FAQ.  Right now, this lives in the wiki, but this is
hard to find, so let's include it in the documentation with Git LFS
itself.

Add the relevant portions to the binary and Makefile so that it can be
accessed using `git lfs help faq`, and add it as well to the Linux
packages.
2022-11-08 19:13:28 +00:00
brian m. carlson
549ade0768
rpm/asciidoctor: build for Rocky Linux 9
If we're building for a RHEL 9 equivalent, use the same patterns as for
RHEL 8 equivalents, since those seem to work and build properly.
2022-10-18 15:33:43 +00:00
brian m. carlson
350d8a20df
rpm: avoid using barewords in comaprison
The version of RPM in Rocky Linux 9 no longer allows string comparisons
with barewords.  Quote the arguments properly to make sure that the
comparison works on Rocky Linux 9.
2022-10-18 15:33:43 +00:00
brian m. carlson
723be34bd0
Include el component for Rocky Linux
For CentOS, we've traditionally included the el7 component, so let's
include the same component for Rocky 8.  While we're at it, let's be
honest about what we're shipping and say Rocky Linux and not CentOS,
since CentOS 8 is dead.
2022-10-18 15:33:43 +00:00
brian m. carlson
9576d07463
rpm: switch completely from ronn to Asciidoctor
Update all the dependencies to refer to Asciidoctor instead and remove
the remaining ronn-related instructions and specs.
2022-07-11 15:11:20 +00:00
brian m. carlson
db9a82132a
rpm: build Asciidoctor if not present
If Asciidoctor is not already present, build the gem as an RPM.
2022-07-11 15:11:20 +00:00
brian m. carlson
e93940960e
rpm: set VERSION_ID to major version
The version ID set right now is a value like "8.5" on Rocky Linux 8.  In
such a situation, it's hard to compare, and this prevents rubygems-devel
from being installed properly in such a situation.  To make things work
properly, strip off the decimal point and decimal value from the end of
the string.
2022-07-11 15:11:19 +00:00
brian m. carlson
28698ad29b
release: v3.2.0 2022-05-20 17:42:26 +00:00
Chris Darroch
13d815e698 Makefile,debian,rpm: build man pages into dirs
We currently build our manual pages and the HTML versions of
them into a single "man" directory, which results in release
package archives on GitHub that contain all of these files
interleaved with each other in that one directory.

When we build Linux RPM and Debian packages, though, the man
pages are installed into their conventional locations under
/usr/share/man/man{1,5}.  (The HTML versions are not included
at all.)

For those downloading the release package archives and not using
the RPM or Debian packages, we can improve their experience by
placing the roff man pages into "man1" and "man5" subdirectories
corresponding to their respective sections of the manual, and the
HTML versions of the pages into an "html" subdirectory.
2022-02-27 12:06:53 -08:00
brian m. carlson
cfaa4e4547
release: v3.1.0 2022-02-08 21:09:48 +00:00
brian m. carlson
a432e4ac52
rpm: always localize packages
When we build packages, we always want them to include localization.
Let's make sure the gettext-devel package is installed and set the
FORCE_LOCALIZE variable to ensure that localization happens and that we
fail if it does not.
2022-02-07 14:42:37 +00:00
Dimitris Apostolou
21b0402690
Fix typos 2022-01-05 08:49:08 +02:00
brian m. carlson
f0c872ac9c
release: v3.0.0 2021-09-13 20:17:50 +00:00
Richard Hansen
e1a295f439 debian and rpm: Pass --skip-repo to install and uninstall 2021-08-26 00:53:26 -04:00
Richard Hansen
6f6ef8b8b0 rpm: Pass --system to git lfs uninstall 2021-08-26 00:53:26 -04:00
brian m. carlson
4424a6769a
Switch from which to command -v
Debian has recently deprecated the which utility and will remove it in a
future version, since POSIX specifies "command -v" for finding the
location of a path and has for some time.  In addition, which has
started complaining loudly to standard error, so it causes test and
makefile output to be hard to read.

Let's switch to the preferred invocation, command -v, in the Makefile,
build tooling, and test suite.
2021-08-23 15:30:43 +00:00
Marcin Cieślak
74c51fa885 Let packagecloud.io recognize almalinux 2021-06-16 23:30:34 +02:00
brian m. carlson
af4e04cfe1
Remove dependencies on NTLM
Remove all the pieces that depend on NTLM and remove the NTLM modules.
2021-02-02 16:41:42 +00:00
brian m. carlson
e813393105
release: v2.13.0 2020-12-07 21:29:05 +00:00
brian m. carlson
5adff7660a
release: v2.12.0 2020-09-01 13:21:22 +00:00
brian m. carlson
fc3e184392
release: v2.11.0 2020-05-06 20:30:42 +00:00
brian m. carlson
86b5bce730
rpm/build_rpms: remove Ruby build RPMs
When building on any CentOS version, we end up building a lot of
additional items, and this is especially true of CentOS 6, where we must
build Ruby.  These intermediate build products run us out of disk space
in CI, so let's remove the RPMs that we installed to build Ruby once
we're done with them.
2020-04-21 16:35:28 +00:00
brian m. carlson
ea4a6b1194
rpm/build_rpms: remove intermediate build products
When building on any CentOS version, we end up building a lot of
additional items, and this is especially true of CentOS 6, where we must
build Ruby.  These intermediate build products run us out of disk space
in CI, so let's clean up the RPM build areas and recreate them before
building Git LFS itself.
2020-04-20 18:01:19 +00:00
brian m. carlson
7b8c6d05da
release: v2.10.0 2020-01-21 15:03:11 +00:00
brian m. carlson
47c13f7046
rpm: use old setup code on CentOS 7
We need to have different %setup invocations on CentOS 8 and older
CentOS versions.  Originally, CentOS 7 was thought to behave like CentOS
8, but the fact that it behaves like CentOS 6 was hidden by the
container images building the RPMs against Git LFS 2.4.0 as part of the
setup process.  As a consequence, we never built the RPMs using the new
versions of the spec files in master, and we never noticed that they
failed in this case.

Since we're no longer building RPMs against an ancient version of Git
LFS as part of the setup process, adjust the Ruby RPMs to call the
correct %setup invocation on CentOS 7.  Note that like the code with
%{?el6}, %{?el7} will expand to either 1 or nothing, so the condition
will be true (nonzero) for CentOS 6 or 7 and false (zero) for 8.
2019-12-02 16:09:46 +00:00
brian m. carlson
65c955a025
rpm: fix order of exclude arguments
CentOS 8 has recently gained a new version of tar.  This version of tar
is sensitive about the order of its operands and only applies the
--exclude arguments to file arguments following them.  As a result, this
version of tar ignores the exclude arguments altogether, which results
in us trying to recursively copy the contents of the tmptar directory
into itself until the operation fails because the file name is too long.

Predictably, this results in a failed build for CentOS 8.  To avoid
that, place the --exclude options before the file arguments so that
they apply correctly and the build succeeds.
2019-11-26 14:47:19 +00:00
brian m. carlson
dca80d4067
rpm: fix build on CentOS 6
The extraction on CentOS 6 doesn't work the same way as on CentOS 7, so
use the old style %setup command for that OS.
2019-10-17 16:36:03 +00:00
brian m. carlson
0ba11aede6
release: v2.9.0 2019-10-15 20:56:43 +00:00
brian m. carlson
b1c16cfa8f
Add support for CentOS 8
Build packages for CentOS 8.  Add it to the list of containers we build
for and the list of packages we have downloads available for.

In the gem spec files, use a different tooling on CentOS 8, since the
old method no longer works there.  Build using a more standard gem build
process so that RPM does the abstraction for us now that it's capable of
it.  Stop deleting the root in the install step since we may have
installed things there by that point, and RPM has handled this properly
for many versions.

Since the syntax "%{?el8}" expands to "1" on CentOS 8 and nothing on
earlier versions, add a 0 in front of it any time we use the macro so
that we don't end up with an empty conditional on earlier versions.
"01" is still true and "0" is false, so the logic works out.

It's been verified that the packages still build on CentOS 7 as well as
CentOS 8.
2019-10-09 20:05:32 +00:00
Kitten King
f5f712b4de
Fix Typos 2019-07-24 07:17:40 +00:00
brian m. carlson
f445f225fd
release: v2.8.0 2019-07-22 19:47:53 +00:00
brian m. carlson
fe2fa6746b
Use git-lfs version of go-ntlm
The upstream of go-ntlm has archived its repository and is no longer
doing releases. Because this dependency is required for Git LFS, we've
created our own fork to ensure that the upstream repo doesn't disappear
on us. Use our own copy of go-ntlm within Git LFS.
2019-04-01 19:00:38 +00:00
brian m. carlson
debfe0fb06
release: v2.7.0 2019-02-13 19:19:42 +00:00