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

[build] Ensure group kibana is added, stricter user creation #7510

Merged
merged 2 commits into from
Jul 8, 2016

Conversation

jbudz
Copy link
Member

@jbudz jbudz commented Jun 20, 2016

This explicitly adds the kibana group instead of relying on useradd -r to create a corresponding group.
Closes #7475

@LeeDr
Copy link

LeeDr commented Jul 5, 2016

@jbudz: I just tried building the packages and got this error;

Invalid package configuration: Cannot package the path '/home/leedr/git/kibana/build/services/systemd/lib', does it exist? {:level=>:error}

The directory indeed does not exist. I could just create it manually and run again for now...

@jbudz
Copy link
Member Author

jbudz commented Jul 5, 2016

@LeeDr master still expects pleaserun 0.0.16 until #7276 is merged

@jbudz
Copy link
Member Author

jbudz commented Jul 7, 2016

jenkins, test this

@jbudz
Copy link
Member Author

jbudz commented Jul 7, 2016

Rebased, 0.0.24 now.

@LeeDr
Copy link

LeeDr commented Jul 7, 2016

Build worked fine now. Now it's just down to the testing...

@LeeDr
Copy link

LeeDr commented Jul 7, 2016

I tried install, then remove, then purge but got an error when it tried to delete the group;
(NOTE That this happened before jbudz push above and should be fixed now)

root@ubuntu64:~/git/kibana/target# dpkg -r kibana
(Reading database ... 233975 files and directories currently installed.)
Removing kibana (5.0.0-alpha5-SNAPSHOT) ...
Stopping kibana service... OK
root@ubuntu64:~/git/kibana/target# 
root@ubuntu64:~/git/kibana/target# grep kibana /etc/group
kibana:x:129:
root@ubuntu64:~/git/kibana/target# grep kibana /etc/passwd
kibana:x:121:129::/home/kibana:/bin/false
root@ubuntu64:~/git/kibana/target# 
root@ubuntu64:~/git/kibana/target# dpkg -P kibana
(Reading database ... 214837 files and directories currently installed.)
Removing kibana (5.0.0-alpha5-SNAPSHOT) ...
Purging configuration files for kibana (5.0.0-alpha5-SNAPSHOT) ...
groupdel: cannot remove the primary group of user 'kibana'  <<<<<<<<<<<<<<<<<<<
dpkg: error processing package kibana (--purge):
 subprocess installed post-removal script returned error exit status 8
Errors were encountered while processing:
 kibana
root@ubuntu64:~/git/kibana/target# 
root@ubuntu64:~/git/kibana/target# grep kibana /etc/group
kibana:x:129:
root@ubuntu64:~/git/kibana/target# grep kibana /etc/passwd
kibana:x:121:129::/home/kibana:/bin/false

@LeeDr
Copy link

LeeDr commented Jul 7, 2016

The last commit fixed the user/group delete issue.

root@ubuntu64:~/git/kibana/target# dpkg -i kibana-5.0.0-alpha5-SNAPSHOT-amd64.deb
Selecting previously unselected package kibana.
(Reading database ... 214834 files and directories currently installed.)
Preparing to unpack kibana-5.0.0-alpha5-SNAPSHOT-amd64.deb ...
Unpacking kibana (5.0.0-alpha5-SNAPSHOT) ...
Setting up kibana (5.0.0-alpha5-SNAPSHOT) ...
Processing triggers for systemd (229-4ubuntu6) ...
Processing triggers for ureadahead (0.100.0-19) ...
root@ubuntu64:~/git/kibana/target# 
root@ubuntu64:~/git/kibana/target# 
root@ubuntu64:~/git/kibana/target# grep kibana /etc/passwd
kibana:x:121:129::/home/kibana:/bin/false
root@ubuntu64:~/git/kibana/target# grep kibana /etc/group
kibana:x:129:
root@ubuntu64:~/git/kibana/target# dpkg -r kibana
(Reading database ... 233975 files and directories currently installed.)
Removing kibana (5.0.0-alpha5-SNAPSHOT) ...
Stopping kibana service... OK
root@ubuntu64:~/git/kibana/target# grep kibana /etc/passwd
kibana:x:121:129::/home/kibana:/bin/false
root@ubuntu64:~/git/kibana/target# grep kibana /etc/group
kibana:x:129:
root@ubuntu64:~/git/kibana/target# dpkg -P kibana
(Reading database ... 214836 files and directories currently installed.)
Removing kibana (5.0.0-alpha5-SNAPSHOT) ...
Purging configuration files for kibana (5.0.0-alpha5-SNAPSHOT) ...
root@ubuntu64:~/git/kibana/target# grep kibana /etc/passwd
root@ubuntu64:~/git/kibana/target# grep kibana /etc/group
root@ubuntu64:~/git/kibana/target# 

NOTE that I did NOT start Kibana in the test above.

@LeeDr
Copy link

LeeDr commented Jul 7, 2016

LGTM
I checked and both my Ubuntu 16 and CentOS7 have
USERGROUPS_ENAB yes in /etc/login.defs

On CentOS I installed and removed with it set to yes and no (rebooted after changing). The kibana user and group were created by the install and removed by the dpkg -P on Ubuntu and yum remove on CentOS.

@LeeDr LeeDr assigned jbudz and unassigned LeeDr Jul 7, 2016
@jbudz jbudz merged commit 13ec202 into elastic:master Jul 8, 2016
elastic-jasper added a commit that referenced this pull request Jul 8, 2016
---------

**Commit 1:**
[build] Ensure group kibana is added, stricter user creation

* Original sha: b54ef4e
* Authored by Jonathan Budzenski <jbudz@users.noreply.github.com> on 2016-06-20T15:27:36Z

**Commit 2:**
[build] Remove user before group

* Original sha: 144a40b
* Authored by Jonathan Budzenski <jbudz@users.noreply.github.com> on 2016-07-07T20:40:18Z
jbudz added a commit that referenced this pull request Jul 8, 2016
@epixa epixa added v5.0.0 and removed v5.0.0 labels Aug 1, 2016
airow pushed a commit to airow/kibana that referenced this pull request Feb 16, 2017
[build] Ensure group kibana is added, stricter user creation

Former-commit-id: 13ec202
cee-chen added a commit that referenced this pull request Feb 20, 2024
`v93.0.0` ⏩ `v93.1.1`

---

## [`v93.1.1`](https://github.com/elastic/eui/releases/v93.2.0)

**This is a patch release primarily intended for use by Kibana.**

- Added top-level `EuiTreeView.Item` export
([#7526](elastic/eui#7526))

## [`v93.1.0`](https://github.com/elastic/eui/releases/v93.1.0)

- Added `index` glyph to `EuiIcon`
([#7498](elastic/eui#7498))
- Updated `EuiHighlight` to accept an array of `search` strings, which
allows highlighting multiple, separate words within its children. This
new type and behavior *only* works if `highlightAll` is also set to
true. ([#7496](elastic/eui#7496))
- Updated `EuiContextMenu` with a new `panels.items.renderItem`
property, which allows rendering completely custom items next to
standard `EuiContextMenuItem` objects
([#7510](elastic/eui#7510))
- `EuiSuperDatePicker` updates:
- Updated `EuiSuperDatePicker` with a new `refreshIntervalUnits` prop.
Passing this prop allows controlling and overriding the default unit
rounding behavior. ([#7501](elastic/eui#7501))
- Updated `EuiAutoRefresh` and `EuiRefreshInterval` with a new
`intervalUnits` prop. Passing this prop allows controlling and
overriding the default unit rounding behavior.
([#7501](elastic/eui#7501))
- Updated `onRefreshChange` to pass back a new `intervalUnits` key that
contains the current interval unit format (seconds, minutes, or hours).
([#7501](elastic/eui#7501))
- Updated `EuiSuperDatePicker` with a new `canRoundRelativeUnits` prop,
which defaults to true (current behavior). To preserve displaying the
unit that users select for relative time, set this to false.
([#7502](elastic/eui#7502))
- Updated `EuiSuperDatePicker` with a new `refreshMinInterval` prop,
which accepts a minimum number in milliseconds
([#7516](elastic/eui#7516))
- Updated `EuiAutoRefresh` and `EuiRefreshInterval` with a new
`minInterval` prop, which accepts a minimum number in milliseconds
([#7516](elastic/eui#7516))

**Bug fixes**

- Fixed `EuiHighlight` to not parse `search` strings as regexes
([#7496](elastic/eui#7496))
- Fixed `EuiSuperDatePicker` submit bug when used within `<form>`
elements ([#7504](elastic/eui#7504))
- Fixed an `EuiTreeView` bug where `aria-expanded` was being applied to
items without expandable children
([#7513](elastic/eui#7513))

**CSS-in-JS conversions**

- Converted `EuiTreeView` to Emotion. Updates as part of the conversion:
([#7513](elastic/eui#7513))
  - Removed `.euiTreeView__wrapper` div node
  - Enforced consistent `icon` size based on `display` size
fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
`v93.0.0` ⏩ `v93.1.1`

---

## [`v93.1.1`](https://github.com/elastic/eui/releases/v93.2.0)

**This is a patch release primarily intended for use by Kibana.**

- Added top-level `EuiTreeView.Item` export
([elastic#7526](elastic/eui#7526))

## [`v93.1.0`](https://github.com/elastic/eui/releases/v93.1.0)

- Added `index` glyph to `EuiIcon`
([elastic#7498](elastic/eui#7498))
- Updated `EuiHighlight` to accept an array of `search` strings, which
allows highlighting multiple, separate words within its children. This
new type and behavior *only* works if `highlightAll` is also set to
true. ([elastic#7496](elastic/eui#7496))
- Updated `EuiContextMenu` with a new `panels.items.renderItem`
property, which allows rendering completely custom items next to
standard `EuiContextMenuItem` objects
([elastic#7510](elastic/eui#7510))
- `EuiSuperDatePicker` updates:
- Updated `EuiSuperDatePicker` with a new `refreshIntervalUnits` prop.
Passing this prop allows controlling and overriding the default unit
rounding behavior. ([elastic#7501](elastic/eui#7501))
- Updated `EuiAutoRefresh` and `EuiRefreshInterval` with a new
`intervalUnits` prop. Passing this prop allows controlling and
overriding the default unit rounding behavior.
([elastic#7501](elastic/eui#7501))
- Updated `onRefreshChange` to pass back a new `intervalUnits` key that
contains the current interval unit format (seconds, minutes, or hours).
([elastic#7501](elastic/eui#7501))
- Updated `EuiSuperDatePicker` with a new `canRoundRelativeUnits` prop,
which defaults to true (current behavior). To preserve displaying the
unit that users select for relative time, set this to false.
([elastic#7502](elastic/eui#7502))
- Updated `EuiSuperDatePicker` with a new `refreshMinInterval` prop,
which accepts a minimum number in milliseconds
([elastic#7516](elastic/eui#7516))
- Updated `EuiAutoRefresh` and `EuiRefreshInterval` with a new
`minInterval` prop, which accepts a minimum number in milliseconds
([elastic#7516](elastic/eui#7516))

**Bug fixes**

- Fixed `EuiHighlight` to not parse `search` strings as regexes
([elastic#7496](elastic/eui#7496))
- Fixed `EuiSuperDatePicker` submit bug when used within `<form>`
elements ([elastic#7504](elastic/eui#7504))
- Fixed an `EuiTreeView` bug where `aria-expanded` was being applied to
items without expandable children
([elastic#7513](elastic/eui#7513))

**CSS-in-JS conversions**

- Converted `EuiTreeView` to Emotion. Updates as part of the conversion:
([elastic#7513](elastic/eui#7513))
  - Removed `.euiTreeView__wrapper` div node
  - Enforced consistent `icon` size based on `display` size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants