Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #268

Merged
merged 47 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
fc0fbb9
Update Go to 1.21.5
andyone Dec 6, 2023
50254c2
Update Adoptium Java to the latest versions + Add Java 21 LTS
andyone Dec 6, 2023
5480e6b
Update goaccess 1.8.1
andyone Dec 6, 2023
5b2efb4
Update HAProxy 2.8 to 2.8.4
andyone Dec 6, 2023
fb246b3
Remove libnetfilter
andyone Dec 6, 2023
2bd2953
Update libuv to 1.47.0
andyone Dec 6, 2023
db11e80
Update maven to 3.9.6
andyone Dec 6, 2023
58f88fb
Update multitail to 7.1.2
andyone Dec 6, 2023
48c8ab7
Update nghttp2 to 1.58.0
andyone Dec 6, 2023
06e0e98
Update redis72 to 7.2.3
andyone Dec 6, 2023
c6a7faf
Update socat to 1.8.0.0
andyone Dec 6, 2023
1b7c119
Update bat to 0.24.0
andyone Dec 6, 2023
1ce4d23
Update createrepo_c to 1.0.2
andyone Dec 6, 2023
954695b
Update curl to 8.5.0
andyone Dec 6, 2023
78ad9e9
daemonize spec refactoring
andyone Dec 6, 2023
6560424
duf spec refactoring
andyone Dec 6, 2023
501485f
pgcenter spec refactoring
andyone Dec 6, 2023
f4cfcff
Update git to 2.43.0
andyone Dec 6, 2023
a4f9c95
Update memcached to 1.6.22
andyone Dec 6, 2023
9844de8
mtr spec refactoring
andyone Dec 6, 2023
161ffe8
Update sshpass to 1.10
andyone Dec 6, 2023
0dba5b7
Remove tcpkali
andyone Dec 6, 2023
d910542
tmux spec refactoring
andyone Dec 6, 2023
9a2625b
Update upx to 4.2.1
andyone Dec 6, 2023
d888cce
Update vips to 8.15.0
andyone Dec 7, 2023
053f3cb
Update zlib to 1.3
andyone Dec 7, 2023
4911388
vmtouch spec refactoring
andyone Dec 7, 2023
34f4bb7
Update ripgrep to 14.0.3
andyone Dec 7, 2023
ca20df1
Update pv to 1.8.5
andyone Dec 7, 2023
cdf9d67
Update nodejs to 20.10.0
andyone Dec 7, 2023
d6f44db
Update meson to 1.3.0
andyone Dec 7, 2023
524c975
Remove luajit
andyone Dec 7, 2023
12bb43d
Update gradle to 8.5
andyone Dec 7, 2023
bdb6b89
Update HDF5 to 1.14.3
andyone Dec 7, 2023
bb1cdb9
Update cronie to 1.7.0
andyone Dec 7, 2023
e182e4a
Update fish to 3.6.4
andyone Dec 7, 2023
000c1e2
Update etcd to 3.5.11
andyone Dec 7, 2023
f40c333
Improve changelog generation script
andyone Dec 7, 2023
3e8d3cb
Improve pgbouncer tests
andyone Dec 8, 2023
9149c08
Disable sanitizers for createrepo_c due to many leak alerts
andyone Dec 8, 2023
9b3a099
Disable sanitizers for createrepo_c due to many leak alerts
andyone Dec 8, 2023
f8fc8e3
Update PostgreSQL 11-16
andyone Dec 10, 2023
8832fca
Update GDAL to 3.7.3
andyone Dec 10, 2023
cf87b9d
netcdf spec refactoring
andyone Dec 10, 2023
f30062b
python3-pycurl spec refactoring
andyone Dec 11, 2023
7a38ee8
Update Erlang 24, 25 and 26 to the latest versions
andyone Dec 21, 2023
24c784c
Improve git spec
andyone Dec 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 61 additions & 33 deletions release-info-gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@ package main

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2023 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //

import (
"fmt"
"os"
"os/exec"
"sort"
"strconv"
"strings"

"pkg.re/essentialkaos/ek.v12/fmtc"
"pkg.re/essentialkaos/ek.v12/path"
"pkg.re/essentialkaos/ek.v12/sortutil"
"pkg.re/essentialkaos/ek.v12/strutil"
"github.com/essentialkaos/ek/env"
"github.com/essentialkaos/ek/fmtc"
"github.com/essentialkaos/ek/path"
"github.com/essentialkaos/ek/sortutil"
"github.com/essentialkaos/ek/strutil"
)

// ////////////////////////////////////////////////////////////////////////////////// //

const (
APP = "ReleaseInfoGen"
VER = "1.0.0"
VER = "2.0.0"
DESC = "Go utility for generating release info"
)

Expand Down Expand Up @@ -59,9 +59,32 @@ func (c Changes) Less(i, j int) bool {
// ////////////////////////////////////////////////////////////////////////////////// //

func main() {
checkoutLatestChanges()
check()
genChanges()
}

// check checks required apps
func check() {
if env.Which("git") == "" {
printErrorAndExit("This script requires git")
}
}

// genChanges generates list of changes
func genChanges() {
err := checkoutLatestChanges()

if err != nil {
printErrorAndExit(err.Error())
}

changes := createChangesList()

if len(changes) == 0 {
printWarn("No changes found")
return
}

listAdditions(changes)
listModifications(changes)
listDeletions(changes)
Expand All @@ -70,20 +93,22 @@ func main() {
// ////////////////////////////////////////////////////////////////////////////////// //

// checkoutLatestChanges checkouts the latest changes
func checkoutLatestChanges() {
func checkoutLatestChanges() error {
cmd := exec.Command("git", "checkout", "-B", "master", "origin/master")
err := cmd.Run()

if err != nil {
printErrorAndExit(err.Error())
return err
}

cmd = exec.Command("git", "checkout", "develop")
err = cmd.Run()

if err != nil {
printErrorAndExit(err.Error())
return err
}

return nil
}

// createChangesList makes slice with changes between develop and master branch
Expand Down Expand Up @@ -118,11 +143,10 @@ func listAdditions(changes Changes) {

for _, c := range changes {
if c.Type == TYPE_ADDED {
pkgName := getSpecValue(c.File, "name")
pkgDesc := getSpecValue(c.File, "summary")
values := getSpecValue(c.File, "name", "summary")

data = append(data, fmt.Sprintf(
"`%s` (_%s_)", pkgName, pkgDesc,
data = append(data, fmtc.Sprintf(
"`%s` (_{&}%s{!}_)", values[0], values[1],
))
}

Expand All @@ -131,22 +155,21 @@ func listAdditions(changes Changes) {
srcName := path.Base(c.Source)

if fileName != srcName {
pkgName := getSpecValue(c.File, "name")
pkgDesc := getSpecValue(c.File, "summary")
values := getSpecValue(c.File, "name", "summary")

data = append(data, fmt.Sprintf(
"`%s` (_%s_)", pkgName, pkgDesc,
data = append(data, fmtc.Sprintf(
"`%s` (_{&}%s{!}_)", values[0], values[1],
))
}
}
}

sortutil.StringsNatural(data)

fmt.Println("### New packages\n")
fmtc.Println("{*}### New packages{!}\n")

for _, info := range data {
fmt.Printf("- %s\n", info)
fmtc.Printf("{s}-{!} %s\n", info)
}

fmtc.NewLine()
Expand All @@ -161,20 +184,19 @@ func listModifications(changes Changes) {
continue
}

pkgName := getSpecValue(c.File, "name")
pkgVer := getSpecValue(c.File, "version")
values := getSpecValue(c.File, "name", "version")

data = append(data, fmt.Sprintf(
"`%s` updated to %s", pkgName, pkgVer,
data = append(data, fmtc.Sprintf(
"`%s` updated to %s", values[0], values[1],
))
}

sortutil.StringsNatural(data)

fmt.Println("### Updates\n")
fmtc.Println("{*}### Updates{!}\n")

for _, info := range data {
fmt.Printf("- %s\n", info)
fmtc.Printf("{s}-{!} %s\n", info)
}

fmtc.NewLine()
Expand Down Expand Up @@ -216,10 +238,10 @@ func listDeletions(changes Changes) {

sortutil.StringsNatural(data)

fmt.Println("### Deletions\n")
fmtc.Println("{*}### Deletions{!}\n")

for _, pkg := range data {
fmt.Printf("- `%s`\n", pkg)
fmtc.Printf("{s}-{!} `%s`\n", pkg)
}

fmtc.NewLine()
Expand Down Expand Up @@ -271,15 +293,21 @@ func filterChanges(changes Changes) Changes {
}

// getSpecValue reads macro value from spec
func getSpecValue(file, macro string) string {
cmd := exec.Command("rpm", "-q", "--qf", "%{"+macro+"}\n", "--specfile", file)
func getSpecValue(file string, macros ...string) []string {
var macroList string

for _, macro := range macros {
macroList += "%{" + macro + "}\n"
}

cmd := exec.Command("rpm", "-q", "--qf", macroList, "--specfile", file)
output, err := cmd.Output()

if err != nil {
return ""
return make([]string, len(macros))
}

return strings.Split(string(output), "\n")[0]
return strings.Split(string(output), "\n")
}

// isUniqSpec returns true if spec is unique (only one spec with this name)
Expand Down
10 changes: 7 additions & 3 deletions specs/adoptium/jdk11.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

################################################################################

%define jdk_major 11.0.19
%define jdk_minor 7
%define jdk_major 11.0.21
%define jdk_minor 9

%define install_dir %{_prefix}/java/%{name}-%{version}
%define jdk_bin_dir %{install_dir}/bin
%define jdk_man_dir %{install_dir}/man/man1

%define alt_priority 1166
%define alt_priority 1167

################################################################################

Expand All @@ -40,6 +40,7 @@ Conflicts: java-1.7.0-openjdk-headless
Conflicts: java-1.8.0-openjdk-headless
Conflicts: java-11-openjdk-headless
Conflicts: java-17-openjdk-headless
Conflicts: java-21-openjdk-headless

AutoProv: no
AutoReqProv: no
Expand Down Expand Up @@ -109,6 +110,9 @@ deps="$deps --slave %{_sysconfdir}/profile.d/java.sh java-profile %{install_dir}
################################################################################

%changelog
* Wed Dec 06 2023 Anton Novojilov <[email protected]> - 11.0.21-9
- https://adoptium.net/en-GB/temurin/release-notes/?version=jdk-11.0.21+9

* Sat Jul 08 2023 Anton Novojilov <[email protected]> - 11.0.19-7
- https://adoptium.net/en-GB/temurin/release-notes/?version=jdk-11.0.19+7

Expand Down
10 changes: 7 additions & 3 deletions specs/adoptium/jdk17.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

################################################################################

%define jdk_major 17.0.7
%define jdk_minor 7
%define jdk_major 17.0.9
%define jdk_minor 9

%define install_dir %{_prefix}/java/%{name}-%{version}
%define jdk_bin_dir %{install_dir}/bin
%define jdk_man_dir %{install_dir}/man/man1

%define alt_priority 1754
%define alt_priority 1755

################################################################################

Expand All @@ -40,6 +40,7 @@ Conflicts: java-1.7.0-openjdk-headless
Conflicts: java-1.8.0-openjdk-headless
Conflicts: java-11-openjdk-headless
Conflicts: java-17-openjdk-headless
Conflicts: java-21-openjdk-headless

AutoProv: no
AutoReqProv: no
Expand Down Expand Up @@ -109,6 +110,9 @@ deps="$deps --slave %{_sysconfdir}/profile.d/java.sh java-profile %{install_dir}
################################################################################

%changelog
* Wed Dec 06 2023 Anton Novojilov <[email protected]> - 17.0.9-9
- https://adoptium.net/en-GB/temurin/release-notes/?version=jdk-17.0.9+9

* Sat Jul 08 2023 Anton Novojilov <[email protected]> - 17.0.7-7
- https://adoptium.net/en-GB/temurin/release-notes/?version=jdk-17.0.7+7

Expand Down
114 changes: 114 additions & 0 deletions specs/adoptium/jdk21.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
################################################################################

%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd

################################################################################

%define __jar_repack %{nil}

################################################################################

%define jdk_major 21.0.1
%define jdk_minor 12

%define install_dir %{_prefix}/java/%{name}-%{version}
%define jdk_bin_dir %{install_dir}/bin
%define jdk_man_dir %{install_dir}/man/man1

%define alt_priority 2155

################################################################################

Summary: OpenJDK Runtime Environment (JDK 21)
Name: jdk21
Epoch: 1
Version: %{jdk_major}
Release: %{jdk_minor}%{?dist}
Group: Development/Languages
License: ASL 1.1 and ASL 2.0 and BSD and BSD with advertising and GPL+ and GPLv2 and GPLv2 with exceptions and IJG and LGPLv2+ and MIT and MPLv2.0 and Public Domain and W3C and zlib
URL: https://adoptium.net

Source0: https://github.com/adoptium/temurin21-binaries/releases/download/jdk-%{jdk_major}+%{jdk_minor}/OpenJDK21U-jdk_x64_linux_hotspot_%{jdk_major}_%{jdk_minor}.tar.gz
Source1: java.sh

Source100: checksum.sha512

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Conflicts: java-1.6.0-openjdk-headless
Conflicts: java-1.7.0-openjdk-headless
Conflicts: java-1.8.0-openjdk-headless
Conflicts: java-11-openjdk-headless
Conflicts: java-17-openjdk-headless
Conflicts: java-21-openjdk-headless

AutoProv: no
AutoReqProv: no

Provides: jdk = 1:21
Provides: jdk-lts = 1:21
Provides: java = 1:21
Provides: jdk-%{jdk_major} = 1:%{version}-%{release}
Provides: jdk-lts-%{jdk_major} = 1:%{version}-%{release}
Provides: java-%{jdk_major} = 1:%{version}-%{release}

Provides: %{name} = %{version}-%{release}

################################################################################

%description
Java™ is the world's leading programming language and platform. The Adoptium
Working Group promotes and supports high-quality, TCK certified runtimes and
associated technology for use across the Java™ ecosystem.

################################################################################

%prep
%{crc_check}

%setup -qn jdk-%{jdk_major}+%{jdk_minor}

%build

%install
rm -rf %{buildroot}

rm -rf demo release

mkdir -p %{buildroot}%{install_dir}
cp -a * %{buildroot}%{install_dir}/

install -pm 644 %{SOURCE1} %{buildroot}%{install_dir}/

%clean
rm -rf %{buildroot}

%post
deps="%{_bindir}/java java %{jdk_bin_dir}/java %{alt_priority}"

for bin in $(ls -1 %{jdk_bin_dir}) ; do
deps="$deps --slave %{_bindir}/$bin $bin %{jdk_bin_dir}/$bin"
done

for doc in $(ls -1 %{jdk_man_dir}) ; do
deps="$deps --slave %{_mandir}/man1/$doc $doc %{jdk_man_dir}/$doc"
done

deps="$deps --slave %{_sysconfdir}/profile.d/java.sh java-profile %{install_dir}/java.sh"

%{_sbindir}/update-alternatives --install $deps

%preun
%{_sbindir}/update-alternatives --remove java %{jdk_bin_dir}/java

################################################################################

%files
%defattr(-, root, root, -)
%{install_dir}

################################################################################

%changelog
* Wed Dec 06 2023 Anton Novojilov <[email protected]> - 21.0.1-12
- Initial build for kaos repository
Loading