diff --git a/README.md b/README.md index 1eb2b79..64bc542 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,13 @@ # rpaste -rpaste utility written in go. +![Rocky Linux rpaste utility (main)](https://img.shields.io/github/last-commit/rocky-linux/rpaste/main) ![Rocky Linux rpaste utility repo issues](https://img.shields.io/github/issues/rocky-linux/rpaste) + +rpaste utility written in go. Originally started as a side project to learn golang which ended up becoming the primary utility provided in Rocky Linux for paste bin needs. This repository is hosted at the [RESF Git Service](https://git.resf.org) with a mirror to [Github](https://github.com/rocky-linux/rpaste). +More information about this repository coming soon. + ## Installation If you are running Rocky Linux, it is available in the extras repository. @@ -15,3 +19,10 @@ If you are running Rocky Linux, it is available in the extras repository. ## Building If you are wanting to build this utility yourself, minimum golang 1.18 is required. Rocky Linux 8.7 and 9.1 should have this. + +## Contributing + +* Fork the repository +* Make sure your changes +* Test your changes! +* Submit a PR for review and acceptance diff --git a/modules/paste/dmidecode.go b/modules/paste/dmidecode.go new file mode 100644 index 0000000..c658066 --- /dev/null +++ b/modules/paste/dmidecode.go @@ -0,0 +1,8 @@ +// basic dmidecode +package paste + +func basicDmidecode() string { + return "test" +} + +// We are hooking directly into /dev/mem diff --git a/modules/paste/fpaste.go b/modules/paste/fpaste.go index 63032fc..e09eb0f 100644 --- a/modules/paste/fpaste.go +++ b/modules/paste/fpaste.go @@ -25,7 +25,7 @@ var ( fpasteBaseURL = "https://paste.centos.org" fpasteAPIKey = "5uZ30dTZE1a5V0WYhNwcMddBRDpk6UzuzMu-APKM38iMHacxdA0n4vCqA34avNyt" fpasteURL = "https://paste.centos.org/api/create" - fpasteUserAgent = "rpaste/0.2.0" + fpasteUserAgent = "rpaste/0.3.0" fpasteTitle = "UNTITLED" // we'll need to make this changeable in the future fpastePrivate = "1" fpasteUserName = "user" diff --git a/rpm/rpaste.1.gz b/rpm/rpaste.1.gz new file mode 100644 index 0000000..0f325c5 Binary files /dev/null and b/rpm/rpaste.1.gz differ diff --git a/rpm/rpaste.spec b/rpm/rpaste.spec new file mode 100644 index 0000000..cfe2efe --- /dev/null +++ b/rpm/rpaste.spec @@ -0,0 +1,61 @@ +%define debug_package %{nil} +ExcludeArch: %{ix86} +Name: rpaste +Version: 0.3.0 +Release: 1%{?dist} +Summary: Rocky Linux pastebin client built in golang + +License: MIT +URL: https://github.com/rocky-linux/rpaste +Source0: %{name}-%{version}.tar.gz +Source1: %{name}.1.gz +BuildRequires: golang >= 1.18.0 + +Provides: rpaste + +%description +Rocky Linux pastebin client as a part of the of the Rocky Linux Extras +repository. rpaste is built in golang and supports pasting to both the rpaste +paste bin service as well as paste.centos.org (fpaste). + +%prep +%autosetup + +%build +go build -v -o %{name} + +%install +install -Dpm 0755 %{name} %{buildroot}/%{_bindir}/%{name} +install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/%{name}.1.gz + +%files +%license LICENSE +%attr(0755,root,root) %{_bindir}/%{name} +%{_mandir}/man1/%{name}.1.gz + +%changelog +* Fri Oct 14 2022 Louis Abel - 0.3.0-1 +- Rebase to 0.3.0 +- Update all vendored libraries +- Require golang 1.18 + +* Sun Aug 28 2022 Louis Abel - 0.2.0-3 +- Allow build on all architectures except i686 + +* Wed Jun 01 2022 Louis Abel - 0.2.0-2 +- Fix missing sources + +* Tue Jan 11 2022 Louis Abel - 0.2.0-1 +- Rebuild rpaste in golang, rebase to 0.2.0 + +* Fri Jul 02 2021 Louis Abel - 0.1-3.2 +- Fix package description + +* Tue Jun 29 2021 Louis Abel - 0.1-3 +- Add piped stdin support + +* Sun Jun 20 2021 Louis Abel - 0.1-2 +- Fix lexer and verify function + +* Wed Jun 16 2021 Louis Abel - 0.1-1 +- First release of rpaste using bash