Giter Site home page Giter Site logo

opensuse-zh / rpmwok Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 1.0 379 KB

Cook RPM package of software that cannot be built easily on OBS

Home Page: https://rpmwok.guoyunhe.me

License: GNU Affero General Public License v3.0

Shell 42.92% HTML 36.81% JavaScript 20.27%

rpmwok's Introduction

Electron RPMbuild - RPM repository for openSUSE & SLE

Packages

Ordered by names

  • electron-ssr
  • electronic-wechat

System requirements

  • openSUSE Tumbleweed or Leap 15+ (SLE, Fedora, CentOS should also be okay)
  • git
  • nodejs 8+
  • npm
  • rpm
  • rpm-build
  • createrepo
  • wget
sudo zypper in git nodejs npm rpm rpm-build createrepo wget
sudo npm install -g yarn

How to add and build a new package

Let's say you have a application Foobar and its package name is foobar, version is 1.2.3, release is 1.

  1. Create a new directory foobar under spec.
  2. Create a new file foobar.spec under spec/foobar.
  3. Write SPEC file content. You can copy from other packages and modify as needed.
  4. Go back to project root directory. Run ./rpmbuild_spec foobar.

If build succeeded, you should see new RPM file foobar-1.2.3-1.x86_64.rpm in repo directory.

If build failed, you can check the console output and build directory ~/rpmbuild/BUILD/foobar-1.2.3 to correct your spec file. If you have any problem, submit a new issue. We are happy to help you!

List of Electron related projects on GitHub.

How to create GPG key

You need a GPG key to sign packages. Unsigned packages are not trusted by most system.

  1. Create GPG key pair for signing packages gpg --gen-key. Default value should be enough. If you choose a password, then you have to manually publish repository every time. If you want to run an automatically script, don't use password.
  2. You need to remember the key name, which looks like 3AA5C34371567BD2.
  3. Export public key gpg -a -o RPM-GPG-KEY-ELECTRON --export 3AA5C34371567BD2.
  4. Move the public key file RPM-GPG-KEY-ELECTRON to repo directory.
  5. Run vi ~/.rpmmacros and add %_gpg_name 3AA5C34371567BD2. This tell rpm which key to use for signing packages.

Usually a GPG key expires in two years. Remember to create a new key before the old expires. Otherwise, users will get errors when fetching your repository.

How to publish a repository

  1. Clone this repository on your server.
  2. Run auto_repo. It will build, sign and publish all packages.
  3. Copy repo/electron-rpmbuild.repo.example to repo/electron-rpmbuild.repo and modify URL
  4. Set up your web server. Point document root to repo directory.

You can create a Cron job to fetch new packages and rebuild repository every night. If version and release in spec file didn't change, package build will be skipped. So you only build updated packages and save a lot of time.

FAQ

Why Electron applications cannot be packaged in openSUSE Build Service

NodeJS programs consist of scripts, which doesn't need a compiler and build process. But...

Most Electron applications use electron-builder to compile application inside a binary. It downloads precompiled Electron binary files from a Electron server. This is NOT allowed by openSUSE Build Service.

So... we do not have any Electron applications in official repository.

What we do here

We write specs of those Electron applications. We also have some scripts to build packages while allow internet access in the process.

Can you trust these packages

You decide.

All scripts we use are here. You can know how we exactly build these packages. You can build all packages by yourselves with these scripts, and even have your own repository. If you don't trust us, build your own!

Electron binary is built by GitHub. If you don't trust it, this solution is not for you.

Even with the same scripts and specs, the build result can be different. That is because Node package dependencies are usually not locked. These dependencies are huge and deep. Nobody, neither us nor the authors of applications, know what is going on in all depended packages. This is the biggest risk of all Electron applications.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.