Skip to content

Commit 2f1e2b8

Browse files
skierpageclaude
andcommitted
Improve catdoc.spec, simplify .packit.yaml
Add autoreconf -fi to %prep, add autoconf/automake BuildRequires, enable %check, expand %doc. Remove create-archive from .packit.yaml since spec now handles autotools bootstrapping from raw git archive. `autoreconf -fi` generates configure (and provides files it needs in build-aux), so no need to track it. Add configure, catdoc-*.tar.gz artifacts from `make dist` and build artifacts in x86_64/ from local RPM/packit builds to .gitignore. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent bb7d4c7 commit 2f1e2b8

6 files changed

Lines changed: 22 additions & 7047 deletions

File tree

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ src/wordview
2626
# Autotools generated files
2727
aclocal.m4
2828
build-aux/
29+
configure
2930
Makefile.in
3031
src/Makefile.in
3132
tests/Makefile.in
@@ -37,3 +38,7 @@ src/config.h.in
3738
tests/**/*.log
3839
tests/**/*.trs
3940
tests/test-suite.log
41+
42+
# `make dist` and local RPM/packit builds
43+
catdoc-*.tar.gz
44+
x86_64/

.packit.yaml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,8 @@ actions:
1919
# overwrites Version: in the spec. This reads the version from configure.ac.
2020
get-current-version:
2121
- autoconf --trace='AC_INIT:$2' configure.ac
22-
create-archive:
23-
- autoreconf -fiv
24-
- ./configure
25-
- make dist
26-
# packit uses the last line of output as the archive path
27-
- bash -c "ls catdoc-*.tar.gz"
28-
29-
srpm_build_deps:
30-
- autoconf
31-
- automake
32-
- make
33-
- gcc
22+
# No create-archive needed: packit uses a raw git archive, and autoreconf -fi
23+
# in the spec's %prep generates the required autotools files during the RPM build.
3424

3525
jobs:
3626
- job: copr_build

NEWS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
0.97.1 in development
2-
Clean up address sanitizer tests
2+
Clean up address sanitizer tests.
3+
Simplify RPM package builds triggered by Packit.
34

45
0.97 March 8 2026
56
Remove 16-bit DOS support. Use version 0.96 if you're still building and

TODO.md

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,8 @@
1818
- [ ] Run `make distcheck` to produce `catdoc-0.97.1.tar.gz`
1919
- [ ] Tag `v0.97.1` and create a GitHub Release
2020
- [ ] Upload `catdoc-0.97.1.tar.gz` (from `make distcheck`) as a release asset
21-
- [ ] Verify packit `trigger: release` Copr build fires and succeeds (see CI issues below)
22-
23-
## Other CI issues
24-
25-
- [x] Confirmed packit PR builds work. To check builds for a PR, go to
26-
https://dashboard.packit.dev/projects/github.com/skierpage/catdoc, find the PR under
27-
"PRs Handled", then follow the Copr build links (e.g.
28-
https://copr.fedorainfracloud.org/coprs/packit/skierpage-catdoc-10/). RPMs are in the
29-
"Pulp results" link at the bottom of each chroot page.
30-
- [ ] `trigger: release` Copr build never fires or fails silently — packit lacks permission
31-
to build in `skierpage/catdoc` Copr project. Need to investigate granting packit access.
32-
See packit docs for Copr credential/permission setup.
33-
- [ ] Fix `Source0` in catdoc.spec to point to the `make dist` tarball uploaded as a GitHub
34-
release asset:
35-
`https://github.com/skierpage/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz`
36-
Currently points to a raw git archive which lacks autotools-generated files and fails to build.
37-
(Packit ignores Source0 since `create-archive` overrides it, so this only matters for manual RPM builds.)
38-
- [ ] Fix `%check` in catdoc.spec to run the test suite against the just-built binaries.
39-
Current attempt with `%{__make} check` runs the system `/usr/bin/catdoc` instead of the
40-
BUILDROOT binary. Fix requires prepending `%{buildroot}%{_bindir}` to PATH in `%check`
41-
and setting `CHARSETPATH` correctly.
42-
21+
- [ ] Verify packit `trigger: release` fires off a Copr build and succeeds,
22+
see https://dashboard.packit.dev/projects/github.com/skierpage/catdoc
4323

4424
## Research: find more Office 2007 test files
4525

catdoc.spec

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
Name: catdoc
2-
Version: 0.97
3-
Release: %autorelease
2+
Version: 0.97.1_devel
3+
Release: 1.20260320162811988977.master.2.gbb7d4c7%{?dist}
44
Summary: programs which extract text from Microsoft Office 97-2004 files
55
License: GPL-2.0-or-later
66
URL: https://github.com/skierpage/catdoc
77
Source0: https://github.com/skierpage/%{name}/archive/refs/tags/v%{version}.tar.gz
8+
BuildRequires: autoconf
9+
BuildRequires: automake
810
BuildRequires: gcc
911
BuildRequires: make
1012
BuildRequires: tk
@@ -39,6 +41,7 @@ via Tk.
3941

4042
%prep
4143
%autosetup -p1 -n %{name}-%{version}
44+
autoreconf -fi
4245

4346
%build
4447
%configure
@@ -47,16 +50,11 @@ via Tk.
4750
%install
4851
%make_install
4952

50-
# Struggling to get this to work
51-
# %check
52-
# %{make} check
53-
# fails when I invoke `packit build locally` with
54-
# /var/tmp/rpm-tmp.5GB8PL: line 47: fg: no job control
55-
# error: Bad exit status from /var/tmp/rpm-tmp.5GB8PL (%check)
56-
# %{__make} check
57-
# works, but fails because it runs /usr/bin/catdoc, not the just-built BUILDROOT/usr/bin/
58-
# %check
59-
# %{__make} check
53+
# Test scripts use ../src/catdoc relative to the tests/ build directory,
54+
# so they run the just-built binary without needing %{buildroot}/%{_bindir}.
55+
# Set CHARSETPATH relative to the build tree for the same reason.
56+
%check
57+
CHARSETPATH="$(pwd)/charsets" %make_build check
6058

6159
%files
6260
%license COPYING
@@ -67,7 +65,7 @@ via Tk.
6765
%{_mandir}/man1/catppt.1.*
6866
%{_mandir}/man1/xls2csv.1.*
6967
%{_datadir}/catdoc
70-
%doc README.md NEWS
68+
%doc README.md NEWS ALTERNATIVES.md CREDITS
7169

7270
%files wordview
7371
%{_bindir}/wordview

0 commit comments

Comments
 (0)