103 Commits

Author SHA1 Message Date
3a7282e96d Merge pull request #23 from grindsa/alma9
use almalinux as base image
2025-01-30 14:14:46 +05:30
181689c268 use almalinux as base image 2023-12-16 08:05:29 +01:00
11f14d6914 Use spaces instead of tabs 2022-11-11 07:36:17 +05:30
339d22eb73 Fix yaml example 2022-11-11 07:35:27 +05:30
98e9d1fea5 Update README.md 2022-11-11 07:31:33 +05:30
17f89933c0 Merge pull request #18 from StCyr/fix_17
Supports new user input: 'additional_repos'
2022-11-10 18:59:17 -07:00
4a85a923b9 Fixes yum-builddep blocks action
Signed-off-by: Cyrille Bollu <cyrille@debian-BULLSEYE-live-builder-AMD64>
2022-11-10 11:42:22 +01:00
95f2400e99 Supports new user input: 'additional_repos'
Allows the user to specify additional repositories to enable before building the rpm

Signed-off-by: Cyrille Bollu <cyrille@debian-BULLSEYE-live-builder-AMD64>
2022-11-10 11:22:28 +01:00
5da3d22130 Merge pull request #16 from StCyr/fix_15
update the gihub action dependencies
2022-11-09 14:52:27 -07:00
4c9aba2975 Adds an action to install build dependencies before running rpmbuild
Signed-off-by: Cyrille Bollu <cyrille@debian-BULLSEYE-live-builder-AMD64>
2022-11-09 15:53:56 +01:00
267f1778ec Try and fix:
name: roadmap
version: 3.0.2
/usr/bin/rpmdev-setuptree
/usr/bin/cp /github/workspace/roadmap.spec /github/home/rpmbuild/SPECS/roadmap.spec
/usr/bin/git archive --output=/github/home/rpmbuild/SOURCES/roadmap-3.0.2.tar.gz --prefix=roadmap-3.0.2/ HEAD
/usr/bin/rpmbuild -ba /github/home/rpmbuild/SPECS/roadmap.spec
error: File /github/home/rpmbuild/SOURCES/roadmap.tar.gz: No such file or directory
Error: action failed with error: Error: The process '/usr/bin/rpmbuild' failed with exit code 1

Signed-off-by: Cyrille Bollu <cyrille@debian-BULLSEYE-live-builder-AMD64>
2022-11-09 15:39:32 +01:00
839c44710f update the gihub action dependencies
Signed-off-by: Cyrille Bollu <cyrille@debian-BULLSEYE-live-builder-AMD64>
2022-11-09 15:27:32 +01:00
c0ba5e8840 Merge pull request #8 from belden/issue-7-specfile-below-root
Correctly operate on specfiles located below root
2021-11-09 14:12:44 +05:30
2857cd9b80 Ensure rpmbuild can find spec files in subdirs
Resolves https://github.com/naveenrajm7/rpmbuild/issues/7

Previously,

```js
await exec.exec(
  `rpmbuild -ba /github/home/rpmbuild/SPECS/${specFile}`
);
```

would fail when given this input:

```yml
- name: build RPM package
  id: my-rpm
  uses: naveenrajm7/rpmbuild
  with:
    spec_file: "rpm/my-specfile.spec"
```

The failure arises because previously, the code said:

```js
const specFile = core.getInput('spec_file');
await exec.exec(`cp /github/workspace/${specFile} /github/home/rpmbuild/SPECS/`);
```

Which meant the commands which ended up being run in the rpmbuild-container
were equivalent to:

```sh
$ cp /github/workspace/rpm/my-specfile.spec /github/home/rpmbuild/SPECS/
$ rpmbuild -ba /home/github/home/rpmbuild/SPECS/rpm/my-specfile.spec
```

`rpmbuild -ba` fails in this situation because the `cp` does not copy the specfile
into `/github/home/rpmbuild/SPECS/rpm/my-specfile.spec`, but instead
into `/github/home/rpmbuild/SPECS/my-specfile.spec`.

The solution is to use the basename of the specfile for `rpmbuild -ba`.

As a matter of personal preference, I've changed the shell commands to
always operate on source-file and destination-file, rather than on
source-file and destination-paths. I've just generally found my own scripts
easier to maintain when I'm a little more explicit like this.
2021-09-25 14:52:47 -07:00
626822dc92 Fix comment
Drive-by:
  * Ignore vim swapfiles
2021-09-25 14:52:31 -07:00
21d76af2f5 Merge pull request #11 from belden/issue-2-compile-tsc-in-container
Build lib/main.js in the container
2021-09-25 23:09:42 +05:30
d99805552c Build lib/main.js in the container
Resolves https://github.com/naveenrajm7/rpmbuild/issues/2

We don't need `lib/main.js` any more, so I've removed it.

Some previou devDependencies from `package.json` are now
production dependencies.
2021-09-24 10:36:12 -07:00
bb22848287 Remove lib/download-release-archive.js
* Introduced in 281f2b8
* Replaced with `curl` in ab399dd
* Typescript removed in 2c036ef
* Import removed in 2ff761f
* Compiled js finally removed in whatever sha this is

Tracking down the history of this file was kind of fun because I could
see how @naveenrajm7's thinking evolved for getting the repo source
into the rpmbuild SOURCES directory.
2021-09-24 10:35:59 -07:00
82db9b57d1 Merge pull request #10 from belden/issue-9-private-repo
Make rpmbuild work work with private repos
2021-09-24 19:40:40 +05:30
7b5a254a87 Make rpmbuild work with private repos
Previously, in order to create /github/home/rpmbuild/SOURCES/foo-1.2.0.tar.gz,
rpmbuild did the following:

1. use curl to download a tarball of the project source
2. unpack it into a local directory
3. repack it with the correct desired directory structure
4. move the repacked tarball to /github/home/rpmbuild/SOURCES

This failed for me at step 1 because the repo I'm trying to use rpmbuild on
is a private repo. There's no means of plumbing a github auth token into the
`curl` command, so the tarball fails to download and everything else fails.

----

Since we have the current repo tree in /github/workspace, we can coerce `git`
to make the archive for us. Now, we:

1. ask git to make the archive

and everything works with a private repo. In order to make this approach work,
I've added `git` into the build container.
2021-09-17 16:37:25 -07:00
7933177d50 Merge branch 'master' of https://github.com/naveenrajm7/rpmbuild 2020-05-18 02:20:21 +05:30
4f9fc13352 update images link in README 2020-05-18 02:17:11 +05:30
76e457ad9f update winning status , open to contribution. 2020-05-18 02:13:56 +05:30
1ab6e71885 added Contributing guide 2020-05-18 01:48:48 +05:30
b7aecab58c added MacOS system file to gitignore 2020-05-18 00:42:08 +05:30
b52f0e593e assets typo v1.0.0 2020-04-01 02:41:22 +05:30
44f3322e47 relative image link 2020-04-01 02:40:27 +05:30
b393c528e2 Update README 2020-04-01 02:34:20 +05:30
ca2383e80a added screenshots 2020-04-01 02:33:54 +05:30
0241680a99 document Dockerfile 2020-04-01 00:27:38 +05:30
b980813ffe documented main.ts 2020-04-01 00:25:09 +05:30
2c036efa4b deleted download-archive function 2020-04-01 00:23:08 +05:30
9ee1f018db added rpm_dir output 2020-03-31 23:57:30 +05:30
13cf204bc3 Merge branch 'master' of https://github.com/naveenrajm7/rpmbuild
Update Action Name
2020-03-31 03:32:11 +05:30
0354642598 added python 2020-03-31 03:18:24 +05:30
e9c77ec5b5 Trying unique name v0.0.1 2020-03-31 02:37:57 +05:30
b407d54681 providing rpm directory 2020-03-31 01:53:31 +05:30
e4673b03fc Created README for action usage 2020-03-31 01:52:01 +05:30
8eaa21bfb0 read file 2020-03-30 19:10:55 +05:30
6557634aae added branding and output 2020-03-30 18:53:50 +05:30
dbaef42d71 setting outputs 2020-03-30 18:35:40 +05:30
2ff761f1ba read values from spec file 2020-03-30 18:23:27 +05:30
08c27c427d code clean 2020-03-30 16:01:37 +05:30
dd228e741d change input name 2020-03-30 16:01:02 +05:30
1b359d3c39 trim inside scope 2020-03-30 15:08:23 +05:30
12c4708eec trim string 2020-03-30 14:49:04 +05:30
44a969a0b7 copy rpm to workspace 2020-03-30 14:02:20 +05:30
19d8f15bf1 string var 2020-03-30 04:28:05 +05:30
efb157518c using child process to get o/p 2020-03-30 04:07:25 +05:30
e9c1abc0c0 using args 2020-03-30 03:51:35 +05:30